I Need Help With Textdraw Functions - 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: I Need Help With Textdraw Functions (
/showthread.php?tid=583640)
I Need Help With Textdraw Functions -
MaxJohnson - 29.07.2015
I have created a textdraw as you can see the screenshot 1 for health 2 for armour 3 for weapons 4 for vehicle so i want to know how can i make a system like a player type 1 in mainchat he will get health if he type 2 he will get armour how i can make it can anyone help me please its urgent
AW: I Need Help With Textdraw Functions -
Mencent - 29.07.2015
Hello!
There where you show the textdraw you have to set a variable. Well in OnPlayerText you check if the variable is on 1 (if you set the variable on 1) and hen you can check which number the player tapped.
Re: I Need Help With Textdraw Functions -
MaxJohnson - 31.07.2015
how can i set a variable can you show me please?
Re: I Need Help With Textdraw Functions -
MaxJohnson - 01.08.2015
still no answer
Re: I Need Help With Textdraw Functions -
Inn0cent - 01.08.2015
Well, When player use /cmds. Just set, ShowingTD[playerid] = 1;
Then use it OnPlayerText.
Ex
Код:
public OnPlayerText(playerid, text[])
{
if(ShowingTD[playerid] == 1)
{
if(strval(text) == 1)
{
ShowingTD[playerid]=0;
TextDrawHideForPlayer(playerid,maintd);
TextDrawShowForPlayer(playerid, rulestd or something);
return 0;
}
And so on.
}
return 1;
}