Dialogs.
#5

Quote:
Originally Posted by Dan.
Посмотреть сообщение
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;
    }
Thank you, works fine now. +Rep
Reply


Messages In This Thread
Dialogs. - by CounterTDM - 30.07.2015, 14:25
Re: Dialogs. - by Dan. - 30.07.2015, 14:37
Re: Dialogs. - by CounterTDM - 30.07.2015, 14:40
Re: Dialogs. - by Dan. - 30.07.2015, 14:45
Re: Dialogs. - by CounterTDM - 30.07.2015, 15:01

Forum Jump:


Users browsing this thread: 1 Guest(s)