05.04.2013, 16:39
(
Last edited by Anjh; 05/04/2013 at 04:47 PM.
Reason: I did not want to double-post.
)
Ok, my command is:
It's probably horribly wrong.
I managed to edit out the compiling errors.
I've tested the command, and it does not work ingame. When you type it correctly, it does not do anything.
Thanks,
anjh.
pawn Code:
CMD:setadmin(playerid, params[])
{
new id, adminlevel;
if(PlayerInfo[playerid][pAdmin] <= 4) return SendClientMessage(playerid, COLOR_SILVER, "You must be atleast a Community Owner to use this command!");
else if(sscanf(params, "d", adminlevel)) return SendClientMessage(playerid, COLOR_SILVER, "Syntax: /setadmin [PlayerID][Admin Level]");
else if(adminlevel > 0 || adminlevel < 5) return SendClientMessage(playerid, COLOR_SILVER, "Error: Must be level 1-5!");
else
{
if(PlayerInfo[playerid][pAdmin] == adminlevel) return SendClientMessage(playerid, COLOR_SILVER, "Error: This player is already that level!");
{
PlayerInfo[id][pAdmin] = adminlevel;
}
}
return 1;
}
I managed to edit out the compiling errors.
I've tested the command, and it does not work ingame. When you type it correctly, it does not do anything.
Thanks,
anjh.

