Raised This Month: $ Target: $400
 0% 

Oh My, is it time to code again?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 09-13-2012 , 13:35   Re: Oh My, is it time to code again?
Reply With Quote #16

Not quite. mp_winlimit doesn't exist in CSGO (for all intents and purposes, it's there but set to 0).

I'll post the code when I get home. It's not complex but took a bit of trial and error. On round_end, you have to pull maxrounds and divide by 2 to build a winlimit. CSGO doesn't fire switch_team for half-time, unfortunately, but announce_phase_end is fired and seems to be a reliable hook for the moment. The end of map also fires announce_phase_end, but it fires cs_intermission first, so I use that (Probably completely unnecessarily) to avoid doing a score switch at the end. That gives us a point to swap the scores.

Another minor issue is I didn't locate an event for the warmup so I could reset scores (If they occur) post-warmup. If you're running logging you'll see that the world triggers events "round_warmup_start" and "round_warmup_end" but these can't be hooked. My rusty knowledge hasn't led me to an exact solution yet and I ultimately decided it wasn't worth the effort, since at worse it causes a map vote 1 round earlier.

There's an event for "player is on last gungame weapon" that I want to hook to bring a "winlimit" support for Arms Race. I haven't tested if it's actually fired yet though. I also need to double check the mechanics on demolition as there's a cvar that controls winning the map/round if a player reaches the last weapon.
__________________
I'm a blast from the past!
ferret is offline
 



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 05:26.


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