24.04.2012, 15:54
Quote:
Well left with two Error
pawn Код:
|
pawn Код:
CMD:setadminlevel(playerid, params[])
{
if(PlayerInfo[playerid][pAdminlevel] == 6)
{
new target, level, targetid;
if(sscanf(params, "ri", target, level)) return SendClientMessage(playerid, 0xCC0000AA, "Server: /setadminlevel [playerid] [level]");
if(level > 5) return SendClientMessage(playerid, 0xCC0000AA, "The maximum level is 5!");
PlayerInfo[target][pAdminlevel] = level;
new aName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME];
GetPlayerName(playerid, aName, sizeof(aName));
GetPlayerName(target, tName, sizeof(tName));
new string[128];
format(string, sizeof(string), "|| You set %s(%d) to admin level %d! ||", tName, targetid, level);
SendClientMessage(playerid, 0x0000FF, string);
format(string, sizeof(string), "Administrator %s has set your admin level to %d!", aName, level); //like above
SendClientMessage(target, 0x0000FF, string);
format(string, sizeof(string), "%s(%d) has just been made apart of the team! Well done!", tName, targetid);
}
else return SendClientMessage(playerid, 0xCC0000AA, "Warning: You are a high enough Admin Level!");
return 1;
}