Raised This Month: $51 Target: $400
 12% 

How to hook the end of warmup period?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
apocalyptic
Senior Member
Join Date: Feb 2013
Location: China
Old 04-16-2017 , 00:30   How to hook the end of warmup period?
Reply With Quote #1

Hi everyone!
I want to execue something before CS:GO warmup period ends. I had tried to hook "round end" and "round prestart" but neither of them work. It seems "round prestart" happens right after "player spawn", even I hook it with a "EventHookMode_Pre" parameter.
Would someone tell me how can I hook the end of warmup period? Thank you!
apocalyptic is offline
Lord Nightmare
Junior Member
Join Date: Feb 2014
Location: Poland
Old 04-16-2017 , 02:42   Re: How to hook the end of warmup period?
Reply With Quote #2

Use Props in game

Code:
	if (GameRules_GetProp("m_bWarmupPeriod") == 1) {
		g_Warmup_Round = true;
	}
	else if (GameRules_GetProp("m_bWarmupPeriod") == 0) {
		g_Warmup_Round = false;
	}
Lord Nightmare is offline
apocalyptic
Senior Member
Join Date: Feb 2013
Location: China
Old 04-16-2017 , 03:31   Re: How to hook the end of warmup period?
Reply With Quote #3

Quote:
Originally Posted by Lord Nightmare View Post
Use Props in game

Code:
	if (GameRules_GetProp("m_bWarmupPeriod") == 1) {
		g_Warmup_Round = true;
	}
	else if (GameRules_GetProp("m_bWarmupPeriod") == 0) {
		g_Warmup_Round = false;
	}
Thank you.
But that seems I have to do it again and again before warmup peroid ends, even so, I can not catch the end of warmup peroid precisely, because when I got "GameRules_GetProp("m_bWarmupPeriod") == 0", warmup period is actually already ended.
Are there any even like "round end" so I can hook it by using HookEvent function?
apocalyptic 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 19:04.


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