Need a help with IRC OnPlayerConnect. - 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: Need a help with IRC OnPlayerConnect. (
/showthread.php?tid=499094)
Need a help with IRC OnPlayerConnect. -
Ercha - 06.03.2014
Hello.
So i've added IRC for my server as a FS and tested it with Mirc, everything seem to work fine. But in IRC, it doesn't shows the message when a player connects to the server. It does shows the message when he leaves the server in-game, but when he connects. I'm not quite sure where could be a problem, i'll paste the OnPlayerConnect info from my gamemode and the same thing from IRC fs.
@IRC
Код:
public OnPlayerConnect(playerid)
{
new joinMsg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(joinMsg, sizeof(joinMsg), "02[%d] 03*** %s has joined the server.", playerid, name);
IRC_GroupSay(groupID, IRC_CHANNEL, joinMsg);
return 1;
}
@GM (Here when a player joins the server, it shows his ip also. I've copied only the info when player joins)
Код:
new c2string[128], playerip[16];
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(c2string, sizeof(c2string), ""chat" "COL_RED"[SERVER] "COL_WHITE"Player %s[%d] has joined the server! "COL_RED" (IP: %s)", PlayerName(playerid), playerid, playerip);
SendMessageToAllAdmins(c2string, -1);
First experience with IRC, if you know how fix the problem, please response. Thanks in advance!