10.06.2015, 03:34
pawn Код:
public OnPlayerText(playerid, text[])
{
if(carshopdentry{playerid}) // check if player in checkpoint or what
{
switch(carshopdentry{playerid})
{
case CARSHOPBOX: // main menu like 1. cars 2. bikes
{
switch(strval(text))
{
case 0: /// here if he selects 1 then it should show this to player
{
//Show your guns textdraw here.
TextDrawShowForPlayer(playerid, CARSHOPBOX);
TextDrawShowForPlayer(playerid, vehicleshop);
}
case 1: here if he selects 2 then it should show this to player
{
//Show your food textdraw here.
TextDrawShowForPlayer(playerid, CARSHOPBOX);
TextDrawShowForPlayer(playerid, bikeshop);
}
}
}
case vehicleshop://If they selected the car i mean '1' = cars textdraw,
{
switch(strval(text))//Switch through the number they type in.
{
case 0: GivePlayerWeapon(playerid,22,50); // dnt mind this weapon i just checking it i will change it later and give vehicle to player
}
}
case bikeshop:
{
switch(strval(text))//Switch through the number they type in.
{
case 0: GivePlayerWeapon(playerid,31,50);//Give the player the weapon they typed the option for
}
}
}
return 0;
}