07.01.2012, 09:44
pawn Код:
CMD:makeadmin(playerid, params[])
{
new level;
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(sscanf(params, "ud", receiverid, level)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /makeadmin [PlayerID/PartOfName] [Level (1 - 9999)]");
if(IsPlayerConnected(receiverid))
{
PlayerInfo[receiverid][pAdmin] = level;
GetPlayerName(receiverid, ReceiverName);
format(str, sizeof(str), "You have set %s's Admin Level to %d", ReceiverName, PlayerInfo[receiverid][pAdmin]);
SendClientMessage(playerid, COLOR_YELLOW, str);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not connected.");
return 1;
}
}
return 1;
}