need help with /setadmin command ! fast
#4

pawn Код:
CMD:makeadmin(playerid, params[])
{
    new targetid, level, string[128];
    [PUT YOUR ADMIN SYSTEM HERE] && !IsPlayerAdmin(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not authourized to use this command.");
    else if(sscanf(params, "ui", targetid, level)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /makeadmin [playerid] [0-5]");
    else if(!IsPlayerConnectedEx(targetid) || !IsPlayerLogged(targetid)) return SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified.");
    else if(level < 0 || level > 5) return SendClientMessageEx(playerid, COLOR_GREY, "You have enter an invalid administrator level.");
    PlayerInfo[targetid][pAdminLevel] = level;
    format(string, sizeof(string), "* You have been made a %s by %s %s.", GetAdminRank(targetid), GetAdminRank(playerid), GetPlayerNameEx(playerid));
    SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "You have made %s a %s.", GetPlayerNameEx(targetid), GetAdminRank(targetid));
    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
+Rep if I helped please bro, it'd really help me out.
Reply


Messages In This Thread
need help with /setadmin command ! fast - by Toxik - 04.11.2014, 16:18
Re: need help with /setadmin command ! fast - by HY - 04.11.2014, 16:27
Re: need help with /setadmin command ! fast - by Toxik - 04.11.2014, 16:30
Re: need help with /setadmin command ! fast - by mkmk - 04.11.2014, 16:36
Re: need help with /setadmin command ! fast - by DavidBilla - 04.11.2014, 17:23
Re: need help with /setadmin command ! fast - by Toxik - 04.11.2014, 17:28
Re: need help with /setadmin command ! fast - by iShawn - 04.11.2014, 17:54
Re: need help with /setadmin command ! fast - by Stinged - 04.11.2014, 18:02
Re: need help with /setadmin command ! fast - by DavidBilla - 04.11.2014, 18:03
Re: need help with /setadmin command ! fast - by mkmk - 04.11.2014, 18:39

Forum Jump:


Users browsing this thread: 1 Guest(s)