pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == dshop11)
{
if(response)
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 1, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Knuckle Dusters");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 2, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Golf Club");
}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 3, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Nite Stick");
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 4, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Knife");
}
if(listitem == 4)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 5, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Baseball Bat");
}
if(listitem == 5)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 6, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Shovel");
}
if(listitem == 6)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 7, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Pool Cue");
}
if(listitem == 7)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 8, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Katana");
}
if(listitem == 8)
{
if(GetPlayerMoney(playerid) <100) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 10, 1);
GivePlayerMoney(playerid, -100);
SendClientMessage(playerid,COLOR_RED,"You bought Dildo");
}
}
return 1;
}
return 0;
if(dialogid == dshop12)
{
if(response)
{
if(listitem == 9)
{
if(GetPlayerMoney(playerid) <250) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 22, 500);
GivePlayerMoney(playerid, -250);
SendClientMessage(playerid,COLOR_RED,"You bought 9mm");
}
if(listitem == 10)
{
if(GetPlayerMoney(playerid) <300) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 23, 500);
GivePlayerMoney(playerid, -300);
SendClientMessage(playerid,COLOR_RED,"You bought Slinced 9mm");
}
if(listitem == 11)
{
if(GetPlayerMoney(playerid) <1000) return SendClientMessage(playerid,COLOR_WHITE, "You do not have enough money.");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerMoney(playerid, -1000);
SendClientMessage(playerid,COLOR_RED,"You bought Desert Eagle");
}
}
return 1;
}
return 0;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == shop11)
{
ShowPlayerDialog(playerid, dshop11, DIALOG_STYLE_LIST, "Melee weapons", "Knuckle Dusters-100$\nGolf Club-100$\nNite Stick-100$\nKnife-100$\nBat-100$\nShovel-100$\nPool Cue-100$\nKatana-100$\nDildo-100$\n", "Buy", "Cancel");
}
if(pickupid == shop12)
{
ShowPlayerDialog(playerid, dshop12, DIALOG_STYLE_LIST, "Pistols", "9mm-250$\nSilenced 9mm-300$\nDesert Eagle-1000$", "Buy", "Cancel");
}
if(pickupid == shop13)
{
ShowPlayerDialog(playerid, dshop13, DIALOG_STYLE_LIST, "Shotguns", "Standard Shotgun-400$\nCombat Shotgun-4000$", "Buy", "Cancel");
}
if(pickupid == shop14)
{
ShowPlayerDialog(playerid, dshop14, DIALOG_STYLE_LIST, "Sub-Machine Guns", "Uzi-500$\nSMG-550$\nTec9-600$", "Buy", "Cancel");
}
if(pickupid == shop15)
{
ShowPlayerDialog(playerid, dshop15, DIALOG_STYLE_LIST, "Rifle's", "Country Rifle-500$\nSniper Rifle-3000$", "Buy", "Cancel");
}
if(pickupid == shop16)
{
ShowPlayerDialog(playerid, dshop16, DIALOG_STYLE_LIST, "Heavy guns", "AK-47-3000$\nM4-3500$", "Buy", "Cancel");
}
return 1;
}