How can i log something to UDP but not file?
I want to modify a script to log data only via UDP but not to a file.
I found out that the annoying messages were logged via: Code:
log_message ("[Fly] successfully loaded.")Code:
native log_message(const message[], any:...);Code:
native log_message_udp(const message[], any:...);So for now, i think i need to modify the part with any: but i dont know how. The documentation doesn't help me a lot at this point. Any hints? Thanks in advance! -- Best regards Alex |
Re: How can i log something to UDP but not file?
"any" is a tag that enables you to supply any tagged argument without getting tag mismatch warnings. For example: CsTeams:v or Float:v.
"..." means you can supply as many arguments as you want. Very common with string formatting functions. In some cases they are also used to leave room for more arguments in the future without giving warnings when using old includes. Usually when you want to log something you also want to include variables, especially when debugging. Here's an example: log_message("Message: %d, %s", random(100), "Hello"); I don't understand what you mean by UDP and I also can't find the function log_message_udp(). Are you saying you want it in the console but not in the log? Then I would suggest server_print(). edon, fast is not always good. I think I edited this post at least 5 times. Some might call that perfectionism others might call it OCD. If moderators can see the post edit history I'm really sorry. |
Re: How can i log something to UDP but not file?
In any you write string/float/integer 's names (Obviously if your print contains one).
Example : PHP Code:
client_print(index, type, message[], any) EDIT : Cmon BlackRose you too fast xd |
Re: How can i log something to UDP but not file?
What exactly are you trying to do? Trying to stream a log via UDP is unreliable (since the primary definition of UDP is that it is unreliable).
To implement the formatting, you'll need to look at functions that use vformat(). You'll find many around here that do. |
| All times are GMT -4. The time now is 21:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.