13.11.2015, 20:11
Quote:
CMDetlevel(playerid, params[]) { new string[SOS]; new toplayerid, level; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, RED, "ERROR: You Aren't High Level Enough To Use This Command"); if(sscanf(params, "ui", toplayerid, level)) return SendClientMessage(playerid, RED, "ERROR: /setlevel [ID] [Level]"); if(!IsPlayerConnected(toplayerid)) return SendClientMessage(playerid, RED, "ERROR: The player is not connected"); if(level < 0 || level > 7) return SendClientMessage(playerid, RED, "ERROR: The level must be beetwen 0 & 7"); format(string, SOS, "***%s has been set as administator level %i", pInfo[toplayerid][Name], level); SendClientMessage(playerid, GREEN, string); format(string, SOS, "You have been set as administrator level %i by %s", level, pInfo[playerid][Name]); SendClientMessage(toplayerid, GREEN, string); pInfo[playerid][Admin]=level; return 1; } |