Server Administrator Problem
#4

Quote:

CMD:makeadmin(playerid, params[])
{
new targetid, level;
new string[128];
if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,COLOR_RED,"{AF1C1C}(INFO):{FFFFFF}Onl y Executive Administators can use this command. ");
else if (sscanf(params, "ui", targetid, level)) return SCM(playerid, COLOR_WHITE,"{E5AC00}Usage: {FFFFFF}/makeadmin [ID] [Level 1-6]");
else if(targetid == INVALID_PLAYER_ID) return SCM(playerid, COLOR_RED, "{B3B3B3}Player is not online");
else
{
format(string, sizeof(string),"{37A63D}(INFO){FFFFFF}You made %s Admin level %i!", PlayerName(targetid), level);
SCM(playerid, COLOR_WHITE, string);
format(string, sizeof(string),"{37A63D}(INFO){FFFFFF}You have been promoted to Level %i Admin by Executive Adminstrator %s ", level, PlayerName(playerid));
SCM(targetid, COLOR_WHITE, string);
PlayerInfo[targetid][pAdmin] = level;
format(string, sizeof(string),"{37A63D}(INFO){FFFFFF}Executive Adminstrator %s promoted %s to Admin Level %i | ",PlayerName(playerid),PlayerName(targetid),level) ;
AdminMessage(COLOR_WHITE, string);
SavePlayer(targetid);
}
return 1;
}

This is the code to make an administrator :P
Reply


Messages In This Thread
Server Administrator Problem - by Jigsaw123 - 23.08.2015, 14:57
Re: Server Administrator Problem - by Logofero - 23.08.2015, 15:20
Re: Server Administrator Problem - by Abagail - 23.08.2015, 15:32
Re: Server Administrator Problem - by Jigsaw123 - 23.08.2015, 16:54
Re: Server Administrator Problem - by MartinSwag - 23.08.2015, 16:58
Re: Server Administrator Problem - by Logofero - 24.08.2015, 16:25
Re: Server Administrator Problem - by SecretBoss - 24.08.2015, 16:49

Forum Jump:


Users browsing this thread: 3 Guest(s)