public OnPlayerCommandText(playerid, cmdtext[])
{
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Current = GetPlayerMenu(playerid);
{
switch(row)
{
case 0:
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Дробовик");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 25, 50);
GivePlayerMoney(playerid, 0-5000);
}
case 1:
if(GetPlayerMoney(playerid) < 5500)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Боевой Дробовик");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 27, 40);
GivePlayerMoney(playerid, 0-5500);
}
case 2:
if(GetPlayerMoney(playerid) < 6500)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Узи");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 28, 250);
GivePlayerMoney(playerid, 0-6500);
}
case 3:
if(GetPlayerMoney(playerid) < 6000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Тек9");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 32, 250);
GivePlayerMoney(playerid, 0-6000);
}
case 4:
if(GetPlayerMoney(playerid) < 7500)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Мp5");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 29, 250);
GivePlayerMoney(playerid, 0-7500);
}
case 5:
if(GetPlayerMoney(playerid) < 10000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили AK47");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 30, 200);
GivePlayerMoney(playerid, 0-10000);
}
case 6:
if(GetPlayerMoney(playerid) < 13000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили M4");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 31, 200);
GivePlayerMoney(playerid, 0-13000);
}
case 7:
if(GetPlayerMoney(playerid) < 10000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Гранаты");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 16, 10);
GivePlayerMoney(playerid, 0-10000);
}
case 8:
if(GetPlayerMoney(playerid) < 6000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Разрывной Дробовик");
GivePlayerWeapon(playerid, 26, 20);
GivePlayerMoney(playerid, 0-6000);
}
case 9:
if(GetPlayerMoney(playerid) < 15000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Огнемет");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 37, 1000);
GivePlayerMoney(playerid, 0-15000);
}
case 10:
if(GetPlayerMoney(playerid) < 9000)
{
SendClientMessage(playerid, 0xFFFF00AA, "Не хватает денег!");
}
else
{
SendClientMessage(playerid, 0xFFFF00AA, "Вы купили Коктейль Молотова");
new PlayerName[30], str[256];
GivePlayerWeapon(playerid, 18, 20);
GivePlayerMoney(playerid, 0-9000);
}
}
return 0;
}
return 0;
}
if(strcmp(cmdtext, "/buymenu", true) == 0)
{
Weapons = CreateMenu("Weapons",1,125,150,300);
SetMenuColumnHeader("Weapons", 0, "Привет чувак,купи оружие и завали врагов");
AddMenuItem("Weapons",0,"Дробовик (50 патронов) 5000$");
AddMenuItem("Weapons",0,"Боевой Дробовик (40 патронов) 5500$");
AddMenuItem("Weapons",0,"Узи (250 патронов) 6500$");
AddMenuItem("Weapons",0,"Тек9 (250 патронов) 6000$");
AddMenuItem("Weapons",0,"Мp5 (250 патронов) 7500$");
AddMenuItem("Weapons",0,"AK47 (200 патронов) 10000$");
AddMenuItem("Weapons",0,"M4 (200 патронов) 13000$");
AddMenuItem("Weapons",0,"Гранаты(10 штук) 10000$");
AddMenuItem("Weapons",0,"Разрывной Дробовик (20 патронов) 6000$");
AddMenuItem("Weapons",0,"Огнемет (100 зарядов) 15000$");
AddMenuItem("Weapons",0,"Коктейль Молотова (20 зарядов) 9000$");
}