[Ajuda] dialog com senha
#2

teste

pawn Code:
#define SenhaADM "2i2eio3raklsn" // senha

#define ComandosAdm 0


if(strcmp(cmd, "/daradmin", true) == 0)
{
    if(!IsPlayerAdmin(playerid))
        return SendClientMessage(playerid, -1, "Vocк nгo tem permissгo");

    ShowPlayerDialog(playerid, ComandosAdm, DIALOG_STYLE_INPUT, "Login", "Enter your password below:", "Login", "Cancel");
    return 1;
}


public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case ComandosAdm:
        {
            if(response)
            {
                if( strcmp( inputtext, SenhaADM, true ) == 0 )
                {
                    SendClientMessage( playerid, -1, "Logado!");
                }
                else
                {
                    SendClientMessage(playerid, -1, " Senha incorreta");
                }
            }
            return true;
        }
    }
    return 1;
}
Reply


Messages In This Thread
dialog com senha - by Blitz22 - 09.03.2014, 20:57
Re: dialog com senha - by PT - 09.03.2014, 21:05

Forum Jump:


Users browsing this thread: 2 Guest(s)