setlevel
#1

hello guys this cmd when i type /setlevel it demote me to level 0 before i type id and level

PHP код:
CMD:setlevel(playerid,params[])
{
  if(
PlayerInfo[playerid][pAdmin] >= 5)
  {
  new 
target,level,string[134];
  if(
sscanf(params,"ud",target,level)) SendClientMessage(playerid,-1,"USAGE: /setlevel [playerid] [0 - 5]");
  if(
level || level 5) return SendClientMessage(playeridCOLOR_RED"Max Admin Level [5]");
  if(!
IsPlayerConnected(target)) return SendClientMessage(playerid,-1,"**Player is not connected");
  
PlayerInfo[target][pAdmin] = level;
  
format(string,sizeof(string),"Administrator %s Has setted your Admin Level To %d",pName(playerid),level);
  
SendClientMessage(target,-1,string);
  
format(string,sizeof(string),"You have setted %s Level To %d",pName(target),level);
  
SendClientMessage(playerid,-1,string);
  }
  else
  {
  
SendClientMessage(playerid,0xFF0000FF,"Only Level +5 can use this command");
  }
  return 
1;
  } 
Reply


Messages In This Thread
setlevel - by Loinal - 10.06.2016, 14:47
Re: setlevel - by oMa37 - 10.06.2016, 14:50
Re: setlevel - by justjamie - 10.06.2016, 15:22
Re: setlevel - by Stinged - 10.06.2016, 15:27
Re: setlevel - by oMa37 - 10.06.2016, 15:28
Re: setlevel - by Vince - 10.06.2016, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)