clickable textdraw
#1

When i enter in game i cant click resume textdraw any help.
Код:
Textdraw6 = TextDrawCreate(286.500000, 104.562500, "RESUME");
TextDrawLetterSize(Textdraw6, 0.529500, 3.791871);
TextDrawAlignment(Textdraw6, 1);
TextDrawColor(Textdraw6, -1);
TextDrawSetShadow(Textdraw6, 0);
TextDrawSetOutline(Textdraw6, 1);
TextDrawBackgroundColor(Textdraw6, 51);
TextDrawFont(Textdraw6, 2);
TextDrawSetProportional(Textdraw6, 1);

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_NO)
	{
	{
	TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, Textdraw8);
    SelectTextDraw(playerid, 0x33AA33AA);
    
	}
	
	}
		
	return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
        {
                if(clickedid == Textdraw6)
                {
    TextDrawHideForPlayer(playerid, Textdraw0);
    TextDrawHideForPlayer(playerid, Textdraw1);
    TextDrawHideForPlayer(playerid, Textdraw2);
    TextDrawHideForPlayer(playerid, Textdraw3);
    TextDrawHideForPlayer(playerid, Textdraw4);
    TextDrawHideForPlayer(playerid, Textdraw5);
    TextDrawHideForPlayer(playerid, Textdraw6);
    TextDrawHideForPlayer(playerid, Textdraw7);
    TextDrawHideForPlayer(playerid, Textdraw8);
    CancelSelectTextDraw(playerid);
                }
}
}
Reply
#2

Read Note
https://sampwiki.blast.hk/wiki/SelectTextDraw
Reply
#3

i dont see where i make mistake
Reply
#4

Like Jeff said... read the note...
"TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable."
Reply
#5

try using this :

pawn Код:
Textdraw6 = TextDrawCreate(286.500000, 104.562500, "RESUME");
TextDrawLetterSize(Textdraw6, 0.529500, 3.791871);
TextDrawAlignment(Textdraw6, 1);
TextDrawColor(Textdraw6, -1);
TextDrawSetShadow(Textdraw6, 0);
TextDrawSetOutline(Textdraw6, 1);
TextDrawBackgroundColor(Textdraw6, 51);
TextDrawFont(Textdraw6, 2);
TextDrawSetProportional(Textdraw6, 1);
TextDrawSetSelectable(Textdraw6, true); // use this to make a textdraw selectable
Reply
#6

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)