Unknow command
#1

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;
}
Reply


Messages In This Thread
Unknow command - by lulo356 - 08.07.2015, 13:46
Re: Unknow command - by SecretBoss - 08.07.2015, 13:51
Re: Unknow command - by dusk - 08.07.2015, 13:54
Re: Unknow command - by lulo356 - 08.07.2015, 14:20
Re: Unknow command - by Mouiz - 08.07.2015, 14:59
Re: Unknow command - by lulo356 - 08.07.2015, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)