How to check if warmup is running?

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

How to check if warmup is running?

Postby Mahi » Sat May 23, 2015 1:47 pm

^ this
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Sat May 23, 2015 2:00 pm

I guess this event gets fired if the warmup starts. http://wiki.sourcepython.com/pages/Event-csgo:round_announce_warmup
And this event is probably called when the warmup ends and the actual match starts. http://wiki.sourcepython.com/pages/Event-csgo:round_announce_match_start
User avatar
satoon101
Project Leader
Posts: 2698
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sat May 23, 2015 2:10 pm

If you have access to the server's console, you can use the following to print out events as they happen:

Code: Select all

sv_cheats 1
net_showevents 2
Image
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Postby Mahi » Sat May 23, 2015 4:18 pm

Ahh of course, didn't realize events would be fired. Thanks guys :) !

EDIT: Any method to completely just disable the plugin during warmup? I find it rather stupid to have "if warmup:" everywhere and then set the warmup variable in those events.
User avatar
Ayuto
Project Leader
Posts: 2195
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Sat May 23, 2015 4:57 pm

You could write another plugin that unloads your plugin when warmup has started and loads it again if warmup is over.
User avatar
satoon101
Project Leader
Posts: 2698
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed May 27, 2015 5:27 am

To accurately know if the warmup round is going, without having to track it yourself with events, you could find the signature/symbol for CCSGameRules::IsWarmupPeriod. Once you have that, you can call that function to get the current boolean value.
Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 55 guests