Textdraw
#1

Hi, Aight, I have wrote this in my script but the problem is if you buy 1 thing for example like 1= gives me gun then the textdraw gets hide automatic and you have to get out from checkpoint and go in back if you want to buy another things. I mean, You cannot buy two things together. This is what i don't want.

PHP код:
if(pizzarobtdentry{playerid} == true)//If they are in the checkpoint, they can use the chat to respond to it.
    
{
        switch(
strval(text))//Switch through the number they type in.
        
{
            case 
1GivePlayerWeapon(playerid,22,50);//Give the player the weapon they typed the option for
            
case 2GivePlayerWeapon(playerid,30,50);
            case 
3GivePlayerWeapon(playerid,31,50);
        }
        
TextDrawHideForPlayer(playerid,pizzabox);//hide the textdraws
        
TextDrawHideForPlayer(playerid,pizza);
        
pizzarobtdentry{playerid} = false;//Set the variable to false
        
return 0;//return 0 so that the number they type will not display in the chat. 
EDITED: Now, i'm using like this. Textdraw doesn't get hide but the problem is if i type "1" it gives me gun and if i type "2" it doesn't give me gun. I have to get out from checkpoint and get in back. This is what i don't want. I want player stay in checkpoint can buy whatever they can. I don't want if any player buy 1 thing and for second things he has to leave checkpoint and come back again in. I don't want this. Anyone help me? Is there any wrong in my code?

PHP код:
if(pizzarobtdentry{playerid} == true)//If they are in the checkpoint, they can use the chat to respond to it.
    
{
        switch(
strval(text))//Switch through the number they type in.
        
{
            case 
1GivePlayerWeapon(playerid,22,50);//Give the player the weapon they typed the option for
            
case 2GivePlayerWeapon(playerid,30,50);
            case 
3GivePlayerWeapon(playerid,31,50);
        }
        
TextDrawShowForPlayer(playerid,pizzabox);//hide the textdraws
        
TextDrawShowForPlayer(playerid,pizza);
        
pizzarobtdentry{playerid} = false;//Set the variable to false
        
return 0;//return 0 so that the number they type will not display in the chat.
    
}
    return 
1;

Reply
#2

Oooops
Reply
#3

Anyone help?
Reply
#4

Just remove these:
pawn Код:
TextDrawHideForPlayer(playerid,pizzabox);//hide the textdraws
TextDrawHideForPlayer(playerid,pizza);
pizzarobtdentry{playerid} = false;//Set the variable to false
And do that when they leave the checkpoint.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)