Command Problem !
#1

I have a problem in /setlevel cmd. When i log in to rcon and writes /setlevel 0(my id) 5(level) it says player is not connected.
here is the command↓

pawn Код:
CMD:setlevel(playerid, params[])
{
    new targetid, level, string[100];
    if(pInfo[playerid][pAdmin] < 5 && !IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_RED, "[ERROR] You are not authorised to use this command");
    if(sscanf(params, "ud", targetid, level)) return SCM(playerid, COLOR_RED, "[USAGE] /setlevel <playerid/part of name> <level>");
    if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_RED, "Player is not connected");
    pInfo[targetid][pAdmin] = level;
    format(string, sizeof(string), "Admin %s has set your admin level to %d", GetName(playerid), level);
    SCM(targetid, COLOR_GREEN, string);
    format(string, sizeof(string), "You have successfully set %s's level to %d", GetName(targetid), level);
    SCM(playerid, COLOR_GREEN, string);
    return 1;
}
help me plz..
Reply


Messages In This Thread
Command Problem ! - by Champ - 24.06.2013, 07:18
Re: Command Problem ! - by San1 - 24.06.2013, 07:28
Re: Command Problem ! - by dEcooR - 24.06.2013, 07:31

Forum Jump:


Users browsing this thread: 1 Guest(s)