Problem with OnDialogResponse
#7

pawn Код:
case SHOP_MENU:
{
if ( !response ) return SendClientMessage(playerid, -1, "You exited the Shop Menu!");
if( response )
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) > 999)
{
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 34,80);
SendClientMessage(playerid, -1, "You Have Bought 80 Shell's of Sniper Ammo");
}
else SendClientMessage(playerid, -1, "ERROR: You Don't Have Enough Money To Buy A Sniper!");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) > 499)
{
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, -1, "You Have Bought Full Armour");
}
}
else SendClientMessage(playerid, -1, "ERROR: You Don't Have Enough Money To Buy Armour!");
}
}
return 1; //line 1559
}
You shout make the else SendClientMessage You don't have enough money like this

pawn Код:
case SHOP_MENU:
{
if ( !response ) return SendClientMessage(playerid, -1, "You exited the Shop Menu!");
if( response )
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) > 999)
{
GivePlayerMoney(playerid, -1000);
GivePlayerWeapon(playerid, 34,80);
SendClientMessage(playerid, -1, "You Have Bought 80 Shell's of Sniper Ammo");
}
else SendClientMessage(playerid, -1, "ERROR: You Don't Have Enough Money To Buy A Sniper!");
}
if(listitem == 1)
{
if(GetPlayerMoney(playerid) > 499)
{
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, -1, "You Have Bought Full Armour");
}
}
else SendClientMessage(playerid, -1, "ERROR: You Don't Have Enough Money To Buy Armour!");
}
}
}
return 1; //line 1559
}
You missing the "{" after the else sendclientmessage but anyway you just use
pawn Код:
switch(listitem)
{
    case 0:
    {
        //Your code
    }
    case 1:
    {
        //Your code
    }
}
Edit: Late.
Reply


Messages In This Thread
Problem with OnDialogResponse - by NinjahZ - 10.08.2013, 23:07
Re: Problem with OnDialogResponse - by NinjahZ - 10.08.2013, 23:31
Re: Problem with OnDialogResponse - by NinjahZ - 10.08.2013, 23:40
Re : Problem with OnDialogResponse - by Naruto_Emilio - 10.08.2013, 23:48
Re: Problem with OnDialogResponse - by NinjahZ - 10.08.2013, 23:54
Re : Problem with OnDialogResponse - by Naruto_Emilio - 10.08.2013, 23:56
Re: Problem with OnDialogResponse - by JusstinRoller - 11.08.2013, 00:00
Re: Problem with OnDialogResponse - by NinjahZ - 11.08.2013, 01:39

Forum Jump:


Users browsing this thread: 1 Guest(s)