06.06.2015, 10:43
I'm using this.
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 код:
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(playerid, GRIS, "Type /robstore to this store.");
TextDrawShowForPlayer(playerid, pizzabox);
TextDrawShowForPlayer(playerid, pizza);
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 1: GivePlayerWeapon(playerid,22,50);//Give the player the weapon they typed the option for
case 2: GivePlayerWeapon(playerid,30,50);
case 3: GivePlayerWeapon(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 1: GivePlayerWeapon(playerid,22,50);//Give the player the weapon they typed the option for
SendClientMessage(playerid, green,"You have purchased 9mm for $2,500");
}