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

Please post any questions about developing your plugin here. Please use the search function before posting!
burnSTATION
Junior Member
Posts: 27
Joined: Wed Mar 16, 2016 5:56 pm

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

Postby burnSTATION » Fri Mar 25, 2016 4:40 am

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!
burnSTATION
Junior Member
Posts: 27
Joined: Wed Mar 16, 2016 5:56 pm

Postby burnSTATION » Fri Mar 25, 2016 5:18 am

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...
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Postby Mahi » Fri Mar 25, 2016 9:26 am

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"
User avatar
Mahi
Senior Member
Posts: 236
Joined: Wed Aug 29, 2012 8:39 pm
Location: Finland

Postby Mahi » Fri Mar 25, 2016 9:30 am

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
burnSTATION
Junior Member
Posts: 27
Joined: Wed Mar 16, 2016 5:56 pm

Postby burnSTATION » Fri Mar 25, 2016 3:51 pm

Wow I never have seen mp_warmup_pausetimer before.

thats all i needed! thank you so much!
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Postby iPlayer » Fri Mar 25, 2016 4:04 pm

Source.Python scripting at its best
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image
burnSTATION
Junior Member
Posts: 27
Joined: Wed Mar 16, 2016 5:56 pm

Postby burnSTATION » Sat Mar 26, 2016 4:29 am

I'm just happy I made a fool of myself.

I can own that.
User avatar
iPlayer
Developer
Posts: 590
Joined: Sat Nov 14, 2015 8:37 am
Location: Moscow
Contact:

Postby iPlayer » Mon Mar 28, 2016 5:22 pm

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.
Image /id/its_iPlayer
My plugins: Map Cycle • Killstreaker • DeadChat • Infinite Jumping • TripMines • AdPurge • Bot Damage • PLRBots • Entity AntiSpam

Hail, Companion. [...] Hands to yourself, sneak thief. Image

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 15 guests