28.06.2013, 06:04
Okay so basically im working on a biz system and im making a command to buy food...
I want it to be so that you can only use the command if your in a business but the problem now is that if your outside of ANY business type it will say unknown command, but if your in for instance a clothing shop it will give the proper error "You are not in a restaurant" when I go into a restaurant business and use the command it works fine...
Command:
I want it to be so that you can only use the command if your in a business but the problem now is that if your outside of ANY business type it will say unknown command, but if your in for instance a clothing shop it will give the proper error "You are not in a restaurant" when I go into a restaurant business and use the command it works fine...
Command:
pawn Код:
CMD:buyfood(playerid, params[])
{
if(BizInfo[GetPVarInt(playerid,"InBiz")][bType] != 6)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " You are not in a restaurant!");
return 1;
}
ShowPlayerDialog(playerid, FOODMENU, DIALOG_STYLE_LIST, "Restaurant", "Sprunk $15\nPizza $30\nHamburger $20\nChicken $25", "Buy", "Cancel");
return 1;
}