Don't understand that.
#1

pawn Код:
//Command Set Admin Level
IRCCMD:isetadminlevel(botid, channel[], user[], host[], params[])
{
   // Check if the user has at least voice in the channel
    if (IRC_IsAdmin(botid, channel, user))
    {
      new pname[MAX_PLAYER_NAME];
      new playerid;
      new level;
      new id;
      new string[128];
      if(level == 5)
      {
       GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
       format(string, 128, "*** An IRC Administrator has set your administration level to Server Administrator.");
       SendClientMessage(playerid, COLOR_PINK, string);

       GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
       format(string,sizeof(string),"[ADMIN UPDATE] An IRC Administrator has set %s(%d)'s administration level to Server Administrator.",pname,playerid);
       IRC_GroupSay(groupID,ADMIN_CHANNEL,string);

       GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
       format(string,sizeof(string),"[ADMIN UPDATE] An IRC Administrator has set %s(%d)'s administration level to Server Administrator.",pname,playerid);
       SendAdminMessage(COLOR_PINK, string);

       PlayerInfo[id][pAdminLevel]=5;
      }
      if(level == 100)
      {
       GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
       format(string, 128, "*** An IRC Administrator has set your administration level to Server Head Administrator.");
       SendClientMessage(playerid, COLOR_PINK, string);

       GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
       format(string,sizeof(string),"[ADMIN UPDATE] An IRC Administrator has set %s(%d)'s administration level to Server Head Administrator.",pname,playerid);
       IRC_GroupSay(groupID,ADMIN_CHANNEL,string);

       GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
       format(string,sizeof(string),"[ADMIN UPDATE]An IRC Administrator has set %s(%d)'s administration level to Server Head Administrator.",pname,playerid);
       SendAdminMessage(COLOR_PINK, string);

       PlayerInfo[id][pAdminLevel]=100;
      }
      if(level == 0)
      {
       GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
       format(string, 128, "*** An IRC Administrator has demoted you, and set your administration level to none.");
       SendClientMessage(playerid, COLOR_PINK, string);

       GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
       format(string,sizeof(string),"[ADMIN UPDATE] An IRC Administrator has demoted %s(%d), and set his administration level to none.",pname,playerid);
       IRC_GroupSay(groupID,ADMIN_CHANNEL,string);

       GetPlayerName(playerid,pname,MAX_PLAYER_NAME);
       format(string,sizeof(string),"[ADMIN UPDATE] An IRC Administrator has demoted %s(%d), and set his administration level to none.",pname,playerid);
       SendAdminMessage(COLOR_PINK, string);

       PlayerInfo[id][pAdminLevel]=0;
      }
   }
   return 1;
}
Код:
15:39	Kh4led	!isetadminlevel 0 100
15:39	[BOT]Ashley	[ADMIN UPDATE] An IRC Administrator has demoted Kh4led(0), and set his administration level to none.
Reply
#2

Remove this
pawn Код:
if(level == 0)
And put this
pawn Код:
if(level == 100)
I think it will work because you do "if(level == 0)" then you will be demoted just try and tell me if it worked
EDIT: I am sorry i just wanted to help i am outta here
Reply
#3

Hmm,
I think I got what you mean..
But I want to get the level the admin inserted, not the player's level, how?
Reply
#4

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Remove this
pawn Код:
if(level == 0)
And put this
pawn Код:
if(level == 100)
I think it will work because you do "if(level == 0)" then you will be demoted just try and tell me if it worked
Then nothing can demote admins.
Think logically.
Reply
#5

I need to get if !isetadminlevel 0 (100) then set admin level to 100, if 0 then set admin level to 0, same to 5.
Reply
#6

Trust me, I won't, I don't see you as a rival.
Reply
#7

Did I say your opinion even matters?
Reply
#8

You didn't say you didn't.
Reply
#9

Enough spamming.
some administrator please remove this comments.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)