I Need Help With Textdraw Functions
#1

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

Reply
#2

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.
Reply
#3

how can i set a variable can you show me please?
Reply
#4

still no answer
Reply
#5

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)