FANDOM


Ovaj callback se poziva kada igrac klikne na textdraw ili napusti select mode (ESC)

Parametri Edit

(playerid, Text:clickedid)
playerid - ID igraca koji koristi TD
Text:clickedid - ID Texdrawa koji se koristi
Return - 1/true ako se koristi jos negde u skritpi. 0/false ako TD nije pronadjes.

Primer Edit

new Text:gTextDraw;
 
public OnGameModeInit()
{
    gTextDraw = TextDrawCreate(10.000000, 141.000000, "MOjTD");       
    TextDrawTextSize(gTextDraw,60.000000, 20.000000);
    TextDrawAlignment(gTextDraw,0);
    TextDrawBackgroundColor(gTextDraw,0x000000ff);
    TextDrawFont(gTextDraw,1);
    TextDrawLetterSize(gTextDraw,0.250000, 1.000000);
    TextDrawColor(gTextDraw,0xffffffff);
    TextDrawSetProportional(gTextDraw,1);
    TextDrawSetShadow(gTextDraw,1);
    TextDrawSetSelectable(gTextDraw, 1);
    return 1;
}
 
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SUBMISSION)
    {
        TextDrawShowForPlayer(playerid, gTextDraw);
        SelectTextDraw(playerid, 0xFF4040AA);
    }
    return 1;
}
 
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == gTextDraw)
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "Kliknuo si na TD.");
         CancelSelectTextDraw(playerid);
    }
    return 1;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.