08.07.2015, 13:46
i maked this two commands, and IG its saying, Unknow commands
pawn Код:
command(setadminlevel, playerid, params[])
{
new targetid, type, string[128], string1[128];
if(sInfo[playerid][Adminlevel] >= 6 && IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command");
if(sscanf(params, "ui", targetid, type)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /setadminlevel [PlayerID] [level 0-6]");
if(type < 0 || type > 6) return SendClientMessage(playerid, COLOR_GREY, "SERVER: Cannot go under 0 or above 6.");
{
format(string, sizeof(string), "Your Admin Level has been set to level %d", type);
SendClientMessage(targetid, ADMINBLUE, string);
format(string1, sizeof(string1), "You've set the Admin Level from %s to level %d", RPName(targetid), type);
SendClientMessage(playerid, ADMINBLUE, string1);
sInfo[targetid][Adminlevel] = type;
}
return 1;
}
command(changeadminpass, playerid, params[])
{
new iu, string[128], code;
if(sInfo[playerid][Adminlevel] >= 6 && IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command");
{
sInfo[iu][AdminCode] = code;
format(string, sizeof(string), "You have changed the Admin Code from %s to %d", RPName(iu), code);
SendClientMessage(playerid, ADMINBLUE, string);
format(string, sizeof(string), "%s has changed your Admin Code to %d", RPName(playerid), code);
SendClientMessage(playerid, ADMINBLUE, string);
}
return 1;
}