03.12.2012, 15:37
Guys,
My /setlevel command does not work. For some odd reason. If somebody can kindly help me fix this problem. I dont see what im doing wrong here.
My /setlevel command does not work. For some odd reason. If somebody can kindly help me fix this problem. I dont see what im doing wrong here.
pawn Код:
CMD:setlevel(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 3) return 0;
new target,level,string[124],pName[24];
if(sscanf(params,"ud",target,level)) return SendClientMessage(playerid,-1,"{FF0000}[USAGE]: {FFFFFF}/Setlevel (PlayerID) (Level)");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"ERROR:Player not connected.");
if(level < 0 || level > 3) return SendClientMessage(playerid,-1,"ERROR:Invalid level. (1 - 3)");
GetPlayerName(target,pName,sizeof(pName));
format(string,sizeof(string),"{00FF40}%s Has Been Promoted To Level %d Administrator!",pName,level);
SendClientMessageToAll(-1,string);
PlayerInfo[playerid][pAdmin] = level;
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
return 1;
}