24.06.2013, 07:18
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↓
help me plz..
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;
}