bar = CreateMenu("EѓA", 2, 150.0, 250.0, 150.0, 150.0);
AddMenuItem(bar, 0, "XOЏ-ѓO‚ 20$");
AddMenuItem(bar, 0, "Њ…‰‰A 50$");
AddMenuItem(bar, 0, "‚A–ЂYP‚EP 10$");
pickap2 = CreatePickup(1239,23,-925.238037, 2756.075195, 46.224376);
bar2 = CreateMenu("EѓA", 2, 150.0, 250.0, 150.0, 150.0);
AddMenuItem(bar2, 0, "ЋAYP–A 20$");
AddMenuItem(bar2, 0, "Ђ…‡•Ћ 50$");
AddMenuItem(bar2, 0, "Ђ‡…HЌ…K… 10$");
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickap)
ShowMenuForPlayer(bar, playerid);
if(pickupid == pickap2)
ShowMenuForPlayer(bar2, playerid);
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Float:health;
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == bar)
{
switch(row)
{
case 0:
{
GivePlayerMoney(playerid, - 20);
if(GetPlayerHealth(playerid, health) < 100)
{
SetPlayerHealth(playerid, health + 30.0);
}
SendClientMessage(playerid, COLOR_YELLOW, " Вы съели хот-дог ");
}
case 1:
{
GivePlayerMoney(playerid, - 50);
if(GetPlayerHealth(playerid, health) < 100)
{
SetPlayerHealth(playerid, health + 50.0);
}
SendClientMessage(playerid, COLOR_YELLOW, " Вы съели пиццу ");
}
case 2:
{
GivePlayerMoney(playerid, - 10);
if(GetPlayerHealth(playerid, health) < 100)
{
SetPlayerHealth(playerid, health + 15.0);
}
SendClientMessage(playerid, COLOR_YELLOW, " Вы съели гамбургер ");
}
}
}
current = GetPlayerMenu(playerid);
if(current == bar2)
{
switch(row)
{
case 0:
{
GivePlayerMoney(playerid, - 20);
if(GetPlayerHealth(playerid, health) < 100)
{
SetPlayerHealth(playerid, health + 30.0);
}
SendClientMessage(playerid, COLOR_YELLOW, " Вы съели шаурму ");
}
case 1:
{
GivePlayerMoney(playerid, - 50);
if(GetPlayerHealth(playerid, health) < 100)
{
SetPlayerHealth(playerid, health + 50.0);
}
SendClientMessage(playerid, COLOR_YELLOW, " Вы съели биляш ");
}
case 2:
{
GivePlayerMoney(playerid, - 10);
if(GetPlayerHealth(playerid, health) < 100)
{
SetPlayerHealth(playerid, health + 15.0);
}
SendClientMessage(playerid, COLOR_YELLOW, " Вы съели блинчик ");
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new idx;
new string[256];
new playername[256];
//new sendername[MAX_PLAYER_NAME];
cmd = strtok(cmdtext, idx);