[Duvida] Como Fazer um Dialog de Anti-fake.
#2

pawn Код:
#include < a_samp >

#define DIALOG_LOGARADM  50  // Troque a caso ja existir
#define SENHAADMIN       123 // Troque a com seu gosto


CMD:logaradmin(playerid)
{

    if(PlayerInfo[playerid][pVarAdmin] == 1) return SendClientMessage(playerid, -1, "ERRO: Vocк jб administrador");

    ShowPlayerDialog(playerid, DIALOG_LOGARADM, DIALOG_STYLE_INPUT, " Administraзгo - Logar ", "\n Insira a senha da administraзгo: \n\n", "Ok", "Sair");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_LOGARADM)
    {
        if(response)
        {
            if(strcmp(inputtext, SENHAADMIN, true) == 0)
            {
                PlayerInfo[playerid][pVarAdmin] = 1;
                SendClientMessage(playerid, -1, "* Logado com sucesso.");
            }
            else
            {
                SendClientMessage(playerid, -1, "ERRO: Senha incorreta !");
            }
        }
    }
    return 1;
}
OBS: nгo compilei, caso estiver errado avise - me
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)