09.03.2014, 21:05
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;
}