Admin Chat Error
#5

Quote:
Originally Posted by _Khaled_
Посмотреть сообщение
Didn't understand the Command part.. what do you mean?
Well, as far as I know you are trying to make separate chats for each admin level so that's how you can do; the script you made has no sense at all (no offence) So, this is how I made:

pawn Код:
dcmd_ac(playerid,params[])
{
    if( AdminLevel[ playerid ] < 1 ) return 0;
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_ERROR,"Usage: /ac (Message)");
    new pname[MAX_PLAYER_NAME];
    new string[128];
    format(string,sizeof(string), "[ADMIN CHAT] %s(%d): %s",pname(playerid), playerid, params); // error line

    SendAdminMessage( AdminLevel[ playerid ], COLOR_PINK, string ); // AdminLevel[ playerid ] his level and color and then string
    return 1;
}
SendAdminMessage sends the message to the SAME level as you put in level parameter, let me explain you;

pawn Код:
SendAdminMessage( 3, COLOR_PINK, string ); // level 3
This will send message to ONLY level 3 admins. Hope this clears it

Edit: It is the complete code lol. If you want to send the admin message to all admins, you can simply use a loop:

pawn Код:
for( new f = 1; f < 10; f++ ) // change 10 to the MAX level of admin system you want
{
    SendAdminMessage( f, color, string ); // this will send the admin message to all admin levels from 1 to 10
}
Reply


Messages In This Thread
Admin Chat Error - by _Khaled_ - 25.08.2012, 13:17
Re: Admin Chat Error - by FalconX - 25.08.2012, 13:28
Re: Admin Chat Error - by _Khaled_ - 25.08.2012, 13:34
Re: Admin Chat Error - by _Khaled_ - 25.08.2012, 13:36
Re: Admin Chat Error - by FalconX - 25.08.2012, 13:37
Re: Admin Chat Error - by _Khaled_ - 25.08.2012, 13:41
Re: Admin Chat Error - by FalconX - 25.08.2012, 13:43
Re: Admin Chat Error - by _Khaled_ - 25.08.2012, 13:48
Re: Admin Chat Error - by FalconX - 25.08.2012, 13:51
Re: Admin Chat Error - by _Khaled_ - 25.08.2012, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)