new PlayerText:tnext[MAX_PLAYERS];new PlayerText:tbuy[MAX_PLAYERS];new PlayerText:tprev[MAX_PLAYERS];new PlayerText:tcan[MAX_PLAYERS];public OnPlayerConnect(playerid){ tnext[playerid] = CreatePlayerTextDraw(playerid, 386.000000, 375.000000, \">\");PlayerTextDrawBackgroundColor(playerid, tnext[playerid], 255);PlayerTextDrawFont(playerid, tnext[playerid], 1);PlayerTextDrawLetterSize(playerid, tnext[playerid], 0.500000, 2.000000);PlayerTextDrawColor(playerid, tnext[playerid], -1);PlayerTextDrawSetOutline(playerid, tnext[playerid], 0);PlayerTextDrawSetProportional(playerid, tnext[playerid], 1);PlayerTextDrawSetShadow(playerid, tnext[playerid], 1);PlayerTextDrawUseBox(playerid, tnext[playerid], 1);PlayerTextDrawBoxColor(playerid, tnext[playerid], 125);PlayerTextDrawTextSize(playerid, tnext[playerid], 404.000000, 0.000000);tbuy[playerid] = CreatePlayerTextDraw(playerid, 266.000000, 364.000000, \" MEGVESZ\");PlayerTextDrawBackgroundColor(playerid, tbuy[playerid], 255);PlayerTextDrawFont(playerid, tbuy[playerid], 1);PlayerTextDrawLetterSize(playerid, tbuy[playerid], 0.500000, 2.000000);PlayerTextDrawColor(playerid, tbuy[playerid], 16711935);PlayerTextDrawSetOutline(playerid, tbuy[playerid], 0);PlayerTextDrawSetProportional(playerid, tbuy[playerid], 1);PlayerTextDrawSetShadow(playerid, tbuy[playerid], 1);PlayerTextDrawUseBox(playerid, tbuy[playerid], 1);PlayerTextDrawBoxColor(playerid, tbuy[playerid], 255);PlayerTextDrawTextSize(playerid, tbuy[playerid], 383.000000, 0.000000);tprev[playerid] = CreatePlayerTextDraw(playerid, 243.000000, 375.000000, \" <\");PlayerTextDrawBackgroundColor(playerid, tprev[playerid], 255);PlayerTextDrawFont(playerid, tprev[playerid], 1);PlayerTextDrawLetterSize(playerid, tprev[playerid], 0.500000, 2.000000);PlayerTextDrawColor(playerid, tprev[playerid], -1);PlayerTextDrawSetOutline(playerid, tprev[playerid], 0);PlayerTextDrawSetProportional(playerid, tprev[playerid], 1);PlayerTextDrawSetShadow(playerid, tprev[playerid], 1);PlayerTextDrawUseBox(playerid, tprev[playerid], 1);PlayerTextDrawBoxColor(playerid, tprev[playerid], 125);PlayerTextDrawTextSize(playerid, tprev[playerid], 271.000000, -13.000000);tcan[playerid] = CreatePlayerTextDraw(playerid, 266.000000, 385.000000, \" MEGSE\");PlayerTextDrawBackgroundColor(playerid, tcan[playerid], 255);PlayerTextDrawFont(playerid, tcan[playerid], 1);PlayerTextDrawLetterSize(playerid, tcan[playerid], 0.500000, 2.000000);PlayerTextDrawColor(playerid, tcan[playerid], -16776961);PlayerTextDrawSetOutline(playerid, tcan[playerid], 0);PlayerTextDrawSetProportional(playerid, tcan[playerid], 1);PlayerTextDrawSetShadow(playerid, tcan[playerid], 1);PlayerTextDrawUseBox(playerid, tcan[playerid], 1);PlayerTextDrawBoxColor(playerid, tcan[playerid], 255);PlayerTextDrawTextSize(playerid, tcan[playerid], 383.000000, 0.000000); return 1;}public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid){ if(playertextid == tbuy[playerid]) { SendClientMessage(playerid, 0xFFFFFFAA, \"You clicked on a textdraw.\"); CancelSelectTextDraw(playerid); } return 1;}CMD:buyveh(playerid, params[]){if(IsPlayerAdmin(playerid)){ PlayerTextDrawShow(playerid, tnext[playerid]); PlayerTextDrawShow(playerid, tbuy[playerid]); PlayerTextDrawShow(playerid, tprev[playerid]); PlayerTextDrawShow(playerid, tcan[playerid]); PlayerTextDrawSetSelectable(playerid, tnext[playerid], 1); PlayerTextDrawSetSelectable(playerid, tbuy[playerid], true); PlayerTextDrawSetSelectable(playerid, tprev[playerid], 1); PlayerTextDrawSetSelectable(playerid, tcan[playerid], 1); kveh[playerid] = CreateVehicle(400, 2485.3037,63.8349,26.3004,127.7493, 1, 1, 0); SetVehicleVirtualWorld(kveh[playerid], 69); SetPlayerVirtualWorld(playerid, 69); SelectTextDraw(playerid, 0x00FF00FF);SetPlayerCameraPos(playerid, 2482.9321,55.5978,27.9189);SetPlayerCameraLookAt(playerid, 2485.3037,63.8349,26.3004);}else Belepve0;return 1;}CMD:exitt(playerid, params[]){ SetCameraBehindPlayer(playerid); SetPlayerVirtualWorld(playerid, 0); CancelSelectTextDraw(playerid); return 1;}
PlayerTextDrawSetSelectable(playerid, tnext[playerid], 1);PlayerTextDrawSetSelectable(playerid, tbuy[playerid], 1);PlayerTextDrawSetSelectable(playerid, tprev[playerid], 1);PlayerTextDrawSetSelectable(playerid, tcan[playerid], 1);
sacperkábé, néhány teszteléssel is megadni a kattintási zónáját. [/quote]hogy lehet ilyen kattintási zónát megadni? asszem\' a lettersize a méregetõs része [/quote]az a betû méretejah és amúgy használok fixchars-t csak még nem volt idõma modba átírni ékezetesre
asszem\' a lettersize a méregetõs része [/quote]az a betû méretejah és amúgy használok fixchars-t csak még nem volt idõma modba átírni ékezetesre
if(_:playertextdraw == … [/quote]ez mit csinál? csakmert nekem erre hibát ír a pawno és rákerestem Google-ba de semmi nincs ilyenrõl
Hát nem nagyon értem if(_:playertextdraw == … ez mit csinál? csakmert nekem erre hibát ír a pawno és rákerestem Google-ba de semmi nincs ilyenrõl [/quote]Az alsóvonás azért van ott, hogy egyeztesse a fajtájukat, mert különben warningot dobna, hogy számot textdraw id-vel hasonlítasz össze. A ... helyére pedig be kellene helyettesítened a tbuy[playerid]-t mondjuk. De mivel van ilyen rész a kódban, azt hittem, ez evidens
if(_:playertextdraw == …
if(_:playertextdraw == tbuy[playerid])
error 017: undefined symbol \"playertextdraw\"
if(_:playertextid == tbuy[playerid])
warning 213: tag mismatch
Change the size of a textdraw (box if TextDrawUseBox is enabled and/or clickable area for use with TextDrawSetSelectable).[/quote]Ennyire remélhetõleg tudsz angolul, ha nem, a google fordító is megteszi, vagy megnézed a fórumos, magyar wikin.