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

[CS:GO] Warmup start/end, halftime, match end


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AoD90
Senior Member
Join Date: Jul 2008
Location: Ugljevik/RS/BIH
Old 11-26-2012 , 13:24   [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #1

Hey all,
I'm new in SM scripting and CS:GO scripting in general.
So can someone tell me is there a way to catch these events?
AoD90 is offline
Send a message via MSN to AoD90
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 11-26-2012 , 22:37   Re: [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #2

http://wiki.alliedmods.net/Counter-S...fensive_Events

I think cs_win_panel_match is the match end, and so is cs_intermission (intermission might also be the halftime). I'm not sure about warmup start and end, you could just hook round_start and round_end and only look at the first occurrence of both.
__________________
Sheepdude is offline
AoD90
Senior Member
Join Date: Jul 2008
Location: Ugljevik/RS/BIH
Old 12-01-2012 , 12:31   Re: [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #3

This is what I have for now.

When 1st player enters server it triggers switch_team. Then when second player enter opposite team it triggers round_end ("Game_Commencing") and then round_start and warmup timer is restarted.
On warmup end it doesn't trigger anything.

On halftime announce_phase_end is triggered and on match end triggers announce_phase_end, cs_intermission and cs_win_panel_match.

Now my next question is: Is there a way to force warmup end?

I tried with CS_TerminateRound but it just restarts warmup timer...
AoD90 is offline
Send a message via MSN to AoD90
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 12-01-2012 , 12:52   Re: [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #4

That's some good investigation, very helpful. I was doing a little investigation myself and it seems to hook the warmup start, you have to look for the second occurrence of round_start, and for warmup end, you'd have to look for the third occurrence.

As far as forcing a warmup end, did you try using CS_TerminateRound after setting mp_do_warmup_period 0 and mp_warmuptime 0? I bet that would do it.
__________________
Sheepdude is offline
AoD90
Senior Member
Join Date: Jul 2008
Location: Ugljevik/RS/BIH
Old 12-01-2012 , 14:00   Re: [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #5

Quote:
Originally Posted by Sheepdude View Post
As far as forcing a warmup end, did you try using CS_TerminateRound after setting mp_do_warmup_period 0 and mp_warmuptime 0? I bet that would do it.
This worked! Thanks
AoD90 is offline
Send a message via MSN to AoD90
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-25-2013 , 22:42   Re: [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #6

I know this is an old thread, but you can end warmup prematurely using the console command mp_warmup_end.
__________________
Dr. McKay is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 01-26-2013 , 00:46   Re: [CS:GO] Warmup start/end, halftime, match end
Reply With Quote #7

True - that cvar didn't exist until a recent patch.

So to summarize:

Warmup Start: Second occurrence of "round_start" event. (occurrence by "mp_do_warmup_period" and "mp_do_warmup_offine" [sic])
Warmup End: Third occurrence of "round_start" event (length determined by "mp_warmuptime" (min 5.0))
Halftime: "announce_phase_end" event (length determined by "mp_halftime_duration")
Demo halftime: "announce_phase_end" event (length determined by "mp_ggtr_halftime_delay")
Match end: "cs_intermission" event and "cs_win_panel_match" event (length determined by "mp_match_restart_delay")

Start warmup command: mp_warmup_start
End warmup command: mp_warmup_end

Please, correct me if I'm mistaken.
__________________

Last edited by Sheepdude; 01-29-2013 at 21:31.
Sheepdude 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 01:52.


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