Checking if player is already admin or not
#1

So I have my setlevel command but how do I check if a player is already admin?

thats half of the code

Код:
CMD:setlevel(playerid, params[])
{
   if(pInfo[playerid][Admin] < 3)  return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) You don't have the priviliges to use this command.");
   else
   {
	  new msg1[150], msg2[150], target, level,name[MAX_PLAYER_NAME];
	  if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) The player you are trying to set admin to is offline!");
	  if(sscanf(params, "ud", target, level))  return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) /setlevel [ID] [LEVEL].");
	  else if(level > 3)  return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) The admin levels are only between 0-3.");
	  else if(level < 0)  return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) The admin levels are only between 0-3.");
	  else
	  {
edit: i mean same level*
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)