SA-MP Forums Archive
Unclickable textdraw? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unclickable textdraw? (/showthread.php?tid=453780)



Unclickable textdraw? - Steezy_ - 26.07.2013

I wanted to make a class selection by using model previewing and clickable textdraws.. but i don't understand why it doesn't works
Here is my code..
Код:
new Text:red;

public OnGameModeInit()
{
        red = TextDrawCreate(446.0, 210.0, "_");
	TextDrawFont(red, TEXT_DRAW_FONT_MODEL_PREVIEW);
	TextDrawUseBox(red, 0);
	TextDrawBoxColor(red, 0x000000FF);
	TextDrawTextSize(red, 100, 100);
	TextDrawSetPreviewModel(red, 88);
	return 1;
}

public OnPlayerConnect(playerid)
{
      TextDrawShowForPlayer(playerid,red);
      TextDrawSetSelectable(Text:red, 1);
      SelectTextDraw(playerid, 0x00FF00FF);
	return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == red)
    {
        SetPlayerPos(playerid, 1630.2030,-2328.9673,13.5469);
        SetPlayerSkin(playerid, 88);
        SetPlayerTeam(playerid, 1);
        gTeam[playerid] = RED_TEAM;
        CancelSelectTextDraw(playerid);
    }
    return 1;
}
Help plz з-з