30.07.2015, 14:25
(
Последний раз редактировалось CounterTDM; 30.07.2015 в 15:01.
)
Issue Solved, thank you!
It could be that the dialog IDs intefere eachother. Can be that you have a dialog with ID 100 in 1 filterscript and a dialog with ID 100 in the other one. Try changing them.
|
ShowPlayerDialog(playerid, 585, DIALOG_STYLE_TABLIST_HEADERS, "Gun Store (Weapons are lost on death)", if(dialogid == 585)
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;
}
Why are you returning 0 OnDialogResponse in the gun shop filterscript? Try this:
pawn Код:
|