Dialogs.
#1

Issue Solved, thank you!
Reply
#2

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.
Reply
#3

Quote:
Originally Posted by Dan.
Посмотреть сообщение
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.
Thanks for your input but that is not the case I dont think. You can see from the gun shop I am using ID '585'..

Код:
ShowPlayerDialog(playerid, 585, DIALOG_STYLE_TABLIST_HEADERS, "Gun Store (Weapons are lost on death)",
if(dialogid == 585)
This dialog ID is clearly not being used in the adminkod script, I am sure its something to do with the 'return 0 & return 1' bits. The actual gun shop script works fine, 100% so the fault is clearly in the admin plugin but for the life of me I cannot work out where.
Reply
#4

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;
    }
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)