Page 1 of 1

[CS:GO] Make Warmup last until stopped by SP

Posted: Fri Mar 25, 2016 4:40 am
by burnSTATION
I'm going to preface this with 2 things:
1. Im entirely new to scripting in general. I have been toying with python (and SourcePython) for roughly 3 days
2. I have written a few things, but mainly just using SayCommand and having that execute a server_command

I need to make warmup last until SP tells it to stop i.e. "end_warmup" or "start_match"

I'm assuming i can do this with with the Tick System, and ideally the plugin wouldn't just make warmup last 999999999 minutes, but just be "warmup"

Any advice or similar source code is all I would need as I am a quick learner and eager to learn this so that I can stop asking questions :P

Thanks!

Posted: Fri Mar 25, 2016 5:18 am
by burnSTATION
I guess some photos can better describe what im trying to do.

I'm trying to turn this
Image

Into this
Image

+ Bonus points if we can actually make the warmup indefinite, rather than 3579131 mins long...

Posted: Fri Mar 25, 2016 9:26 am
by Mahi
You can just use "mp_warmup_pausetimer 1" to get the second image. Once you want to quit (f.e. on saycommand or similar) the warmup, you do "mp_warmup_pausetimer 0"

Posted: Fri Mar 25, 2016 9:30 am
by Mahi
You can just use the server command

Code: Select all

mp_warmup_pausetimer 1
to pause the timer and get the result in your second image.

Once you wish to unpause, just set it back to zero, and optionally, end the warmup immediately

Code: Select all

mp_warmup_pausetimer 0
mp_warmup_end

Posted: Fri Mar 25, 2016 3:51 pm
by burnSTATION
Wow I never have seen mp_warmup_pausetimer before.

thats all i needed! thank you so much!

Posted: Fri Mar 25, 2016 4:04 pm
by iPlayer
Source.Python scripting at its best

Posted: Sat Mar 26, 2016 4:29 am
by burnSTATION
I'm just happy I made a fool of myself.

I can own that.

Posted: Mon Mar 28, 2016 5:22 pm
by iPlayer
I guess Mahi saved me from making a fool of myself. It'd be much funnier if he came up with those cvars after somebody'd already implemented it programmatically.