Server log - connected message rewrite
Hello,
How can I rewrite the following message in the server logs ? Code:
Player<4><STEAM_0:0:12345><>" connected, address "127.0.0.1:27005"Thank you! |
Re: Server log - connected message rewrite
You can't, you have to remake them.
|
Re: Server log - connected message rewrite
You probably can using Orpheu.
But you want to do what exactly ? |
Re: Server log - connected message rewrite
I want to change the whole message by blocking the old one and rewrite (with log_message() maybe) a new one.
Ex: "Playe1r<4><STEAM_0:0:123><>" connected, address "127.0.0.1:27005" to Player2<4><STEAM_0:0:456><>" connected, address "127.0.0.1:27005" The way can be different, I just want to edit that message. Thank you for replies! |
Re: Server log - connected message rewrite
Well you could try to hook SV_ConnectClient(), then hooking Log_Printf(), checking it's your string, sending a new one, and superceding the original call.
|
Re: Server log - connected message rewrite
Code:
#include <amxmodx> |
Re: Server log - connected message rewrite
You have created the file Log_Printf, right ? You can't just hook randomly function, you need to provide a file and signature.
|
Re: Server log - connected message rewrite
No, I haven't created it.
The function (Log_Print) returns the log message that I need ? In this case, I don't need SV_ConnectClient(), because I can identify the message by contain(string, "connected, address") != -1 I will try to understand from tutorials how to do that file and signature, even it is strange by now. Thank you! |
Re: Server log - connected message rewrite
I've said to hook SV_ConnectClient() to filter the messages. Log_Print is used probably often, when in this function there is only 2 Log_Print(), including the wanted string. So you would check 2 strings max, which would be more efficient.
|
| All times are GMT -4. The time now is 20:10. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.