Execute CVAR with 1min timeleft
Trying to write a very simple plugin
When the timeleft=1, OR when a round ends, I would like a certain cvar (sm_psay perhaps) to run. I imagine this should be no more than 3-4 lines... Any help is appreciated! :) |
Re: Execute CVAR with 1min timeleft
I think it will be a bit more than 3-4 lines.
You have to setup a timer OnMapStart for mp_timeleft * 60.0. Then you also have to react on when the cvar mp_timeleft changes. You can use the forward OnMapTimeLeftChanged. Kill the timer and start it with the new value. sm_psay is a command afaik, not a cvar. It's a bad thing to call commands from plugins. I think you can use PrintToChat() instead. |
All times are GMT -4. The time now is 00:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.