SA-MP Forums Archive
How to make .. - 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: How to make .. (/showthread.php?tid=221977)



How to make .. - berz - 06.02.2011

Hey all. How i can make that i can see players chat on my server trought rcon tool?


Re: How to make .. - bartje01 - 06.02.2011

You automaticly see their chat in your server.exe console ?...


Re: How to make .. - berz - 06.02.2011

No, but I want to see their chat on rcon tool


Re: How to make .. - Zack9764 - 06.02.2011

You mean when you login as an RCON administrator you can see (I'm assuming your an RP server?) local chat?


Re: How to make .. - berz - 06.02.2011

Quote:
Originally Posted by Zack9764
Посмотреть сообщение
You mean when you login as an RCON administrator you can see (I'm assuming your an RP server?) local chat?
Exactly


Re: How to make .. - Zack9764 - 06.02.2011

At the top:
Код:
new Eavesdropping[MAX_PLAYERS]
Код:
if(strcmp(cmd, "/eavesdrop", true) == 0)
{
       if(IsPlayerAdmin(playerid))//An RCON admin. 
       {
            if(Eavesdropping[playerid] == 0)
            {
                 Eavesdropping = 1;
                 SendClientMessage(playerid, 0xBFC0C2FF, " Your now eavesdropping.");
                 return 1;
            }
            else if(Eavesdropping[playerid] == 1)
            {
                 Eavesdropping = 0;
                 SendClientMessage(playerid, 0xBFC0C2FF, " Your no longer eavesdropping.");
                 return 1;
            }
       else
       {
            SendClientMessage(playerid, 0xBFC0C2FF, " Your not an RCON Admin.");
            return 1;
        }
}
And add this:
Код:
forward SendToEavesdropper(color,string[]);
public SendEavesdropper(color,string[]) {
	for(new i=0;i<MAX_PLAYERS;i++) {
	    if(Eavesdropping[i] && IsPlayerAdmin == 1) {
	        SendClientMessage(i,color,string);
	    }
	}
	return 1;
}
Then put

Код:
SendToEavesdropper(COLOR,string);
everywhere after the client message sent that you want RCON admins to hear.

BTW, sorry it took so long. I was AFK.