16.06.2012, 02:04
pawn Код:
f(strcmp(cmd, "/daradmin", true) ==0 )
{
if (strcmp(PlayerName(playerid),"ShakaL_xD", true)==0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /daradmin [ id ] [Level 0 б 1342]");
return true;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
{
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 has promoted %s to a level %d admin.", sendername, giveplayer, level);
format(string, sizeof(string), " Voce foi promovido para level %d de Admin - Por %s", level, PlayerName(playerid));
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Voce promoveu o(a) %s Para o level %d de Admin.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "%s Promoveu %s a adm level %d ",PlayerName(playerid),giveplayer,level);
}
}
SendClientMessage(playerid, COLOR_LIGHTGREEN, "[SERVER]: Voce nгo esta autorizado a usar este comando!");
}
}
return true;
}