Dialog Response Help.
#10

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_LOGIN) // Login Dialogue
    {
        if(!response) return SendClientMessage(playerid, 0xFFFFFFFF, "You clicked Quit"),Kick(playerid);
        if(strlen(inputtext) >= 1) return Permission[playerid] = true,SpawnPlayer(playerid);
        if(strlen(inputtext) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Please actually enter a password"),ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "That account already exists!\n Please enter your password below:", "Login", "Quit");
    }
    return 1;
}
If bug,you need to use SetSpawnInfo before the SpawnPlayer(playerid);.
and in OnPlayerRequestSpawn,you need return 0.

#Edit:
put on top of Script:
pawn Код:
new bool:Permission[MAX_PLAYERS];
and in OnPlayerRequestSpawn:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(Permission[playerid]) return ? 1; : ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "That account already exists!\n Please enter your password below:", "Login", "Quit");
    return 0;
}
Reply


Messages In This Thread
Dialog Response Help. - by Snip3d - 03.07.2012, 22:22
Re: Dialog Response Help. - by Dolby - 03.07.2012, 22:39
Re: Dialog Response Help. - by Snip3d - 03.07.2012, 22:49
Re: Dialog Response Help. - by Dolby - 03.07.2012, 23:16
Re: Dialog Response Help. - by Snip3d - 04.07.2012, 00:07
Re: Dialog Response Help. - by Dolby - 04.07.2012, 00:08
Re: Dialog Response Help. - by Snip3d - 04.07.2012, 00:13
Re: Dialog Response Help. - by Dolby - 04.07.2012, 00:19
Re: Dialog Response Help. - by Snip3d - 04.07.2012, 00:26
Re: Dialog Response Help. - by Dolby - 04.07.2012, 00:34

Forum Jump:


Users browsing this thread: 1 Guest(s)