Raised This Month: $32 Target: $400
 8% 

CS:GO - How to check if server is in paused state?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 03-02-2015 , 19:56   CS:GO - How to check if server is in paused state?
Reply With Quote #1

Like the title, is there a way to check if the server is paused?

I know I could hook mp_pause_match but CS:GO has a command that will auto pause the game if 10 players are not in the server.

PHP Code:
sv_matchpause_auto_5v5 "0" // When enabled will automatically pause the match at next freeze time if less than 5 players are connected on each team. 

So is there a way to check if the server is paused when this executes the pause? Or if the server is paused at all?
__________________
versatile_bfg is offline
splewis
Veteran Member
Join Date: Feb 2014
Location: United States
Old 03-02-2015 , 20:27   Re: CS:GO - How to check if server is in paused state?
Reply With Quote #2

Try this:
PHP Code:
stock bool IsPaused() {
    return 
GameRules_GetProp("m_bMatchWaitingForResume") != 0;

(straight from https://github.com/splewis/csgo-pug-...eneric.sp#L205)
__________________
splewis is offline
versatile_bfg
Veteran Member
Join Date: Feb 2012
Old 03-02-2015 , 21:06   Re: CS:GO - How to check if server is in paused state?
Reply With Quote #3

Quote:
Originally Posted by splewis View Post
Try this:
PHP Code:
stock bool IsPaused() {
    return 
GameRules_GetProp("m_bMatchWaitingForResume") != 0;

(straight from https://github.com/splewis/csgo-pug-...eneric.sp#L205)
sweet. Thanks heaps
__________________
versatile_bfg is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode