suppress the message "the game will restart in x second
HOW? )
i do amx_csay LIVE! LIVE! LIVE! then sv_restart 3 i see hud message "LIVE! LIVE! LIVE!" for a second (but i want more) and then standard message "the game will restart in 3 seconds." but the only thing i want to see is hud, or just won't dissapearing when "the game will restart in x seconds." displays. |
I believe that function "will restart in x Seconds" is found in one of the stats plugins.
|
no, it's a server's message. you can turn off ALL ADDONS and enter in sever console: sv_restart 1
and you will see that message. |
If you want to block that message, you will need to use the engine module.
Here's how I'd do it: Code:
register_message basically lets you hook a function to any game messages. In this case the "game will restart in" is done by the TextMsg message. And then you can block it by returning PLUGIN_HANDLED or let a message continue by returning PLUGIN_CONTINUE. In this case I only block the TextMsg when the message is about the game restarting, otherwise it will display all other text messages such as Counter-Terrorists Win. |
thank you very much)
i wrote my own plugin with hud instead of poor cs's standard messages) |
here it is.. but it crashes the server on map change.
Code:
|
Quote:
|
0.16 register_message will crash the server on mapchange. Sorry :)
|
Thanks for info, Bailo.
Ok, well if that's case you can either update to 0.20 if you wish or you can try this: Change: Code:
To: Code:
Remove the entire function called hook_TextMsg and replace it with this: Code:
set_msg_block is another way to block messages. I'm just so used to using register_message that I rarely use it. But this should work in 0.16 AFAIK. |
Will this work?
Events are captured in Post so they've already happened... |
| All times are GMT -4. The time now is 17:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.