01.08.2015, 17:36
Quote:
Код:
CMD:makeadmin(playerid, params[]) { if(PlayerInfo[PID][pAdmin] >= 5 || IsPlayerAdmin(playerid)) { new PID; new player[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME]; new string[128] if(sscanf(params, "u", PID,pAdmin)) return SendClientMessage(playerid, 0xFFFF00, "/makeadmin [playerid] [adminlevel]"); GetPlayerName(PID, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, player, sizeof(player)); PlayerInfo[PID][pAdmin] = level; format(string, sizeof(string), "You are now an administrator level %d thanks to %s.", level, player); SendClientMessage(giveplayerid, 0xFFFF00, string); format(string, sizeof(string), "You have given %s level %d admin.", giveplayer,PlayerInfo[PID][pAdmin]); SendClientMessage(playerid, 0xFFFF00, string); if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, 0xFF0000FF, "This player isn't online." return 1; } |