20.12.2010, 18:11
Hi all,i've a big problem with the admin chat:
Here is the code:
The problem is:
When a player ingame writes @text,the chat working,but in the irc echo is showing @text (At the pulic chan,in the IRC_ADMINCHANNEL it's working)
This is what appear in the main chan:
[8:12pm] <Bot1> [ID: 1] Testk: @BLA BLA BLA
This text doesnt need to show.
Thanks.
Here is the code:
pawn Код:
if(text[0] == '@')
{
if(PlayerInfo[playerid][AdminLevel] > 2)
{
if(!strlen(text[1])) return SendClientMessage(playerid, COLOR_ORANGE, "USAGE: @<text>");
new sendername[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
new string[128];
format(string, sizeof(string), "Admin Chat [%i]%s: %s" ,playerid,sendername, text[1]);
SendMessageToAdmins(COLOR_GREEN, string);
IRC_GroupSay(gGroupID, IRC_ADMINCHANNEL, string);
AdminCLog(string);
return 0;
}
else return 0;
}
When a player ingame writes @text,the chat working,but in the irc echo is showing @text (At the pulic chan,in the IRC_ADMINCHANNEL it's working)
This is what appear in the main chan:
[8:12pm] <Bot1> [ID: 1] Testk: @BLA BLA BLA
This text doesnt need to show.
Thanks.