admin chat echoe's to irc :s
#1

When i am typing in the admin chat it echoes this to irc: FuTuRe(id 0): @hello

This is in my admin chat script (onplayertext) :
pawn Код:
if(text[0] == '@')
    {
        if(UserUD[playerid][admin] > 0)
        {
            format(string, sizeof(string), "Admin: %s(%i): %s", UserUD[playerid][accname], playerid, text[1]);

            for(new j = 0; j < MAX_PLAYERS; j++)
            {
            if(IsPlayerConnected(j) && UserUD[j][admin] > 0) SendClientMessage(j, green, string);
            }
            }
            else SendClientMessage(playerid,green,"You aren't a admin!");
        return 0;
        }
My irc script:
pawn Код:
public OnPlayerText(playerid, text[])
{
  new string[256];
  new PlayerName[MAX_PLAYER_NAME];
  GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    format(string, sizeof(string), "2(ID:%d)7 %s: %s", playerid, PlayerName, text);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
    return 1;
}
Reply
#2

Nice, I'm looking for something like this to my server
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)