Textdraw
#1

I'm using this.

PHP код:
new bool:pizzarobtdentry[MAX_PLAYERS char];//Creating a variable to store if the player is in the checkpoint or not. 
//Your code 
if(checkpointid == PizzaRob

    
SendClientMessage(playeridGRIS"Type /robstore to this store."); 
    
TextDrawShowForPlayer(playeridpizzabox); 
    
TextDrawShowForPlayer(playeridpizza); 
    
pizzarobtdentry{playerid} = true;//Setting the variable to true, because they are in the checkpoint. 

     
public 
OnPlayerText(playerid,text[]){ 
    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. 
    

    return 
1


I'm using this but i want it should remove 1k from player and then give gun to player and also send msg to playerid that you have purchased 9mm. I tried but it didn't work. Anyone help?

PHP код:
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 
            
SendClientMessage(playeridgreen,"You have purchased 9mm for $2,500");
        } 
Reply


Messages In This Thread
Textdraw - by sscarface - 06.06.2015, 10:43
Re: Textdraw - by Crystallize - 06.06.2015, 10:56
Re: Textdraw - by sscarface - 06.06.2015, 17:44
Re: Textdraw - by sscarface - 06.06.2015, 17:53
Re: Textdraw - by SickAttack - 06.06.2015, 18:15
Re: Textdraw - by sscarface - 06.06.2015, 18:23

Forum Jump:


Users browsing this thread: 1 Guest(s)