15.04.2010, 22:39
Estou com uma duvida no meu /editaradmin
Queria saber como eu coloco, q pode de editar o admin da pessoa atй um certo level pf me ajudam !!!
ta aqui o meu /editaradmin do meu Pawn
Queria saber como eu coloco, q pode de editar o admin da pessoa atй um certo level pf me ajudam !!!
ta aqui o meu /editaradmin do meu Pawn
Код:
if(strcmp(cmd, "/editaradmin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /editaradmin [ id ] [LEVEL ( 1 - 1334 )]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1338)
{
if(admtrampando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/profadmin)");
return 1;
}
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pAdmin] = level;
printf("ADMIN CMD: %s promoveu %s a Administrador.", sendername, giveplayer, level);
format(string, sizeof(string), " Vocк foi promovido a Administrador - By: %s. ", level, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк promoveu o(a) %s Para ADM: %d. ", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Voce nгo esta autorizado a usar este comando!");
}
}
return 1;
}

