SA-MP Forums Archive
Why does it echo 2 times? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why does it echo 2 times? (/showthread.php?tid=493352)



Why does it echo 2 times? - rakshith122 - 08.02.2014

pawn Код:
public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
    new string[128];
    printf("*** IRC_OnUserJoinChannel (Bot ID %d): User %s (%s) joined channel %s!", botid, user, host, channel);
    format(string,sizeof(string),"[IRC JOIN] User %s has joined the IRC Channel %s!",user,channel);
    SendClientMessageToAll(COLOR_ROYALBLUE,string);
    return 1;
}
This is my "OnUserJoinChannel", When a user joins on the IRC channel, it echo's correctly but it does twice.
For example :
[IRC JOIN] User rakshith122 has joined the channel #extreme
[IRC JOIN] User rakshith122 has joined the channel #extreme

I don't know what and where is the problem,
Hope someone would help me,
Thanks.


Re: Why does it echo 2 times? - Hostskool - 08.02.2014

You have 2 bots? If yes, use gGroupID instead of botid in the display message.

You need to define gGroupID and add both the bots to this group. Consult the Incognito's demo filterscript.


Re: Why does it echo 2 times? - rakshith122 - 08.02.2014

Mostly everywhere, The script uses "gGroupID" and "gGroupAdminID" to echo.
Also, An example would be appreciated!


Re: Why does it echo 2 times? - Don_Cage - 08.02.2014

Search fo this and see if you have it somewhere else.
pawn Код:
[IRC JOIN] User %s has joined the IRC Channel %s



Re: Why does it echo 2 times? - Hostskool - 08.02.2014

Код:
public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
    new string[128];
    if(botid == 1)
    {
    format(string,sizeof(string),"[IRC JOIN] User %s has joined the IRC Channel %s!",user,channel);
    SendClientMessageToAll(COLOR_ROYALBLUE,string);
    }
    return 1;
}
This should work I think.