20.10.2011, 09:36
Hello i create makeadmin command now i need to modify it
just like LuxAdmin Here is i want to copy just like LuxAdmin
i try it many times but it still give me bug ingame.
Order List Needed:
You cant Set The Level of The Admin that already in that level
GameText "Promote" when promote to 1 to 10
GameText "Demote" When demote to (example your level 7) became level 6
Here is my makeadmin command:
heres my other problem that post yesterday
https://sampforum.blast.hk/showthread.php?tid=291291
Please Help me guys
just like LuxAdmin Here is i want to copy just like LuxAdmin
i try it many times but it still give me bug ingame.
Order List Needed:
You cant Set The Level of The Admin that already in that level
GameText "Promote" when promote to 1 to 10
GameText "Demote" When demote to (example your level 7) became level 6
Here is my makeadmin command:
pawn Code:
CMD:makeadmin(playerid, params[])
{
new victimname[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id;
if(PlayerInfo[playerid][pAdmin] >= 10 || IsPlayerAdmin(playerid))
{
if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setadmin <playerid/name> <level>");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid ID");
if (admlvl > 10 || admlvl < 0) return SendClientMessage(playerid, COLOR_RED,"ERROR: Available Admin Levels: 1-10!");
PlayerInfo[id][pAdmin] = admlvl;
GetPlayerName(id, victimname, sizeof(victimname));
GetPlayerName(playerid, adminname, sizeof(adminname));
new str[128];
format(str,128,"Administrator %s has set %s Admin Level to %i",adminname,victimname,admlvl);
SendClientMessage(playerid,COLOR_GREEN,str);
format(str, sizeof(str), "Administrator %s has made %s to Admin Level %i",adminname,victimname,admlvl);
SendToAdmins(COLOR_GREY,str);
format(str, sizeof(str), "Administrator %s has made %s to Admin Level %i",adminname,victimname,admlvl);
printf(str);
}
else return SendClientMessage(playerid,COLOR_RED,"ERROR: You");
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=291291
Please Help me guys