[pawn]
#define weapons 106
CMD:fegyver(playerid)
{
ShowPlayerDialog (playerid, weapons, DIALOG_STYLE_LIST, \"Weapon Shop\", \"Armour - $2000\\n9mm - $700\\nSilenced - $1000\\nDesert Eagle - $1200\\nUzi - $1500\\nTec-9 - $1500\\nMP5 - $1200\\nShotgun - $1500\\nShawn-off - $1800\\nCombat Shotgun - $2000\\nAK-47 - $3000\\nM4 - $4000\\nRifle - $3000\\nSniper rifle - $5000\\n\",\"OK\", \"Cancel\" );
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid==weapons)
{
if(response)
{
if(listitem==0)
{
SetPlayerArmour(playerid, 100.0);
GivePlayerMoney(playerid,-2000);
}
if(listitem==1)
{
GivePlayerWeapon(playerid, 22, 500);
GivePlayerMoney(playerid,-700);
}
if(listitem==2)
{
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 23, 200);
GivePlayerMoney(playerid,-1000);
}
if(listitem==3)
{
if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerMoney(playerid,-1200);
}
if(listitem==4)
{
if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 28, 500);
GivePlayerMoney(playerid,-1500);
}
if(listitem==5)
{
if(GetPlayerMoney(playerid) < 1500) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 32, 500);
GivePlayerMoney(playerid,-1500);
}
if(listitem==6)
{
if(GetPlayerMoney(playerid) < 1200) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 29, 500);
GivePlayerMoney(playerid,-1200);
}
if(listitem==7)
{
GivePlayerWeapon(playerid, 25, 300);
GivePlayerMoney(playerid,-1500);
}
if(listitem==8)
{
if(GetPlayerMoney(playerid) < 1800) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 26, 300);
GivePlayerMoney(playerid,-1800);
}
if(listitem==9)
{
if(GetPlayerMoney(playerid) < 2000) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 27, 300);
GivePlayerMoney(playerid,-2000);
}
if(listitem==10)
{
if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 30, 500);
GivePlayerMoney(playerid,-3000);
}
if(listitem==11)
{
if(GetPlayerMoney(playerid) < 4000) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 31, 500);
GivePlayerMoney(playerid,-4000);
}
if(listitem==12)
{
if(GetPlayerMoney(playerid) < 3000) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 33, 100);
GivePlayerMoney(playerid,-3000);
}
if(listitem==13)
{
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid,COLOR_PME,\"You have not enough Money!\");
GivePlayerWeapon(playerid, 34, 100);
GivePlayerMoney(playerid,-5000);
}
}
}
return 1;
}
[/pawn]