Why are you returning 0 OnDialogResponse in the gun shop filterscript? Try this:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 585)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 200)
return SendClientMessage(playerid, 0xAA3333AA, "[Gun Store] You don't have enough money to buy this Weapon.");
GivePlayerMoney(playerid, -200);
GivePlayerWeapon(playerid, 23, 300);
SendClientMessage(playerid, 0x009900FF, "[Gun Store] You have successfully purchased this Weapon.");
}
case 1:
{
if(GetPlayerMoney(playerid) < 100)
return SendClientMessage(playerid, 0x009900FF, "[Gun Store] You don't have enough money to buy this Weapon.");
GivePlayerMoney(playerid, -100);
GivePlayerWeapon(playerid, 9, 300);
SendClientMessage(playerid, 0x009900FF, "[Gun Store] You have successfully purchased this Weapon.");
}
case 2:
{
if(GetPlayerMoney(playerid) < 1500)
return SendClientMessage(playerid, 0x009900FF, "[Gun Store] You don't have enough money to buy this Weapon.");
GivePlayerMoney(playerid, -1500);
GivePlayerWeapon(playerid, 16, 300);
SendClientMessage(playerid, 0x009900FF, "[Gun Store] You have successfully purchased this Weapon.");
}
}
}
}
return 1;
}