admin chat echoe's to irc :s - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: admin chat echoe's to irc :s (
/showthread.php?tid=151185)
admin chat echoe's to irc :s -
iStarzz - 29.05.2010
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;
}
Re: admin chat echoe's to irc :s -
Elmin - 09.12.2010
Nice, I'm looking for something like this to my server