Dialog not working
#1

When i use the following code, a dialog will show up but no action is being taken. It probably is a minor glitch.

pawn Код:
#include <a_samp>

#define DIALOG_HOME 1
#define FILTERSCRIPT




public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/menu", cmdtext, true) == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_HOME, DIALOG_STYLE_LIST, "Home Menu", "Kill\nHeal\nWeapons\nCars\nTeleport", "Ok", "Cancel");
        return 1;
    }
    return 0;
}


public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_HOME)
    {
        switch(listitem)
        {
            case 0:{SetPlayerHealth(playerid, 0.0);}
            case 1:{SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 100.0);}
            case 2:{SetPlayerHealth(playerid, 0.0);}
            case 3:{SetPlayerHealth(playerid, 0.0);}
            case 4:{SetPlayerHealth(playerid, 0.0);}

        }
    }
    return 1;
}
Reply


Messages In This Thread
Dialog not working - by martin149 - 21.08.2012, 11:29
Re: Dialog not working - by clarencecuzz - 21.08.2012, 11:40
Re: Dialog not working - by martin149 - 21.08.2012, 11:53
Re: Dialog not working - by clarencecuzz - 21.08.2012, 11:57
Re: Dialog not working - by martin149 - 21.08.2012, 12:04
Re : Dialog not working - by ricardo178 - 21.08.2012, 12:04
Re: Dialog not working - by Zaila - 21.08.2012, 12:16
Re: Dialog not working - by clarencecuzz - 21.08.2012, 12:27

Forum Jump:


Users browsing this thread: 3 Guest(s)