17.04.2017, 22:46
Код:
#define PasswordA "testeee" //Senha #define DIALOG_ADMIN 1000 // ID da dialog aqui <<< public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_ADMIN) { if(response && !isnull(inputtext)) { if(strcmp(inputtext, PasswordA, false) == 0) { Admin[playerid] = 1; // variavel do admin } else Kick(playerid); } else Kick(playerid); } return 1; } public OnPlayerSpawn(playerid) { if(Admin[playerid] == 1) // Variavel do admin { ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_PASSWORD, "{CD3333}Senha admin", "Digite a senha de administrador:", "Logar", "Cancelar"); } return 1; }