Weird Dialog Problem
#6

Ok, made it with cases.. Much better.
Whole public:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 49:
        {
            if(response)
            {
                if(PlayerData[playerid][GunID] == 24) return SCM(playerid,red,"ERROR: You already have a deagle as a gun");
                SCM(playerid,COLOR_LIGHTBLUE,"You will now spawn with a free deagle");
                PlayerData[playerid][GunID] = 24;
                GivePlayerWeapon(playerid,24,100);
                ShowPlayerDialog(playerid,47,DIALOG_STYLE_LIST,"City hall","Passport\n Gun License","Open","Close");
                return 1;
            }
        }
        case 50:
        {
            if(response)
            {
                if(PlayerData[playerid][GunID] == 25) return SCM(playerid,red,"ERROR: You already have a shotgun as a gun");
                SCM(playerid,COLOR_LIGHTBLUE,"You will now spawn with a free shotgun");
                PlayerData[playerid][GunID] = 25;
                GivePlayerWeapon(playerid,25,100);
                ShowPlayerDialog(playerid,47,DIALOG_STYLE_LIST,"City hall","Passport\n Gun License","Open","Close")
                return 1;
            }
        }
    }
    return 0;
}
Reply


Messages In This Thread
Weird Dialog Problem - by Tanush123 - 07.02.2012, 22:25
Re : Weird Dialog Problem - by ricardo178 - 07.02.2012, 22:38
Re: Weird Dialog Problem - by Tanush123 - 07.02.2012, 22:40
Re : Weird Dialog Problem - by ricardo178 - 07.02.2012, 22:43
Re: Weird Dialog Problem - by Tanush123 - 07.02.2012, 22:46
Re : Weird Dialog Problem - by ricardo178 - 07.02.2012, 22:51
Re: Weird Dialog Problem - by Tanush123 - 07.02.2012, 22:53
Re : Weird Dialog Problem - by ricardo178 - 07.02.2012, 22:55
Re: Weird Dialog Problem - by Tanush123 - 07.02.2012, 23:19
Re : Weird Dialog Problem - by ricardo178 - 07.02.2012, 23:25

Forum Jump:


Users browsing this thread: 5 Guest(s)