05.06.2015, 02:34
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.
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 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.
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 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);
}
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;
}