PDA

View Full Version : Don't understand that.


_Khaled_
04/10/2012, 01:23 PM
//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.

Red_Dragon.
04/10/2012, 01:27 PM
Remove thisif(level == 0)
And put this 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

_Khaled_
04/10/2012, 01:28 PM
Hmm,
I think I got what you mean..
But I want to get the level the admin inserted, not the player's level, how?

CmZxC
04/10/2012, 01:28 PM
Remove thisif(level == 0)
And put this 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.

_Khaled_
04/10/2012, 01:32 PM
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.

Roel
04/10/2012, 01:48 PM
Trust me, I won't, I don't see you as a rival.

_Khaled_
04/10/2012, 01:50 PM
Did I say your opinion even matters? :o

Roel
04/10/2012, 01:51 PM
You didn't say you didn't.

_Khaled_
04/10/2012, 01:52 PM
Enough spamming.
some administrator please remove this comments.