Quote:
Originally Posted by d0nTtoucH
can someone make this with command ? Like .. /Setprefix id prefix name ..
|
Something like this? If so then don't just copy and paste it as you will need to change some stuff, for example where I wrote "[ADMIN SYSTEM HERE]"
pawn Код:
CMD:makeadmin(playerid, params[])
{
new targetid, level, string[128];
[ADMIN SYSTEM HERE] && !IsPlayerAdmin(playerid)) return SendClientMessageEx(playerid, -1, "You are not authourized to use this command.");
else if(sscanf(params, "ui", targetid, level)) return SendClientMessageEx(playerid, -1, "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, -1, "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-1, string);
format(string, sizeof(string), "You have made %s a %s.", GetPlayerNameEx(targetid), GetAdminRank(targetid));
SendClientMessageEx(playerid, -1, string);
return 1;
}
REP if I helped please