AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Pause (https://forums.alliedmods.net/showthread.php?t=137765)

n3wton 09-09-2010 06:03

[L4D2] Pause
 
2 Attachment(s)
I Know there is already a pause mod out there, but the main developer stopped working on it, and the latest version someone else wrote doesn't work on any 3 of the servers I have access too.

So I wrote my own from scratch for my servers, and silver asked me to release it, so I went through fixing a few bugs and added so cvars... so here it is.

COMMANDS

!pause - Starts a pause vote, if the vote is 50% or more, then the game is pause (note: if a client ignores the vote, and the vote time runs out, they automatically vote "yes")
!unpause - Starts an unpause vote, if the vote is 50% or more, then the game is unpaused (note: if a client ignores the vote, and the vote timer runs out, they automatically vote "no" )

!forcepause (admin only) Pauses the game instantly without a vote.
!forceunpause (admin only) Unpauses the game instantly without a vote. (note: !forceunpause can be used when !pause was used to pause, but if the game was paused via !forcepause then !unpause will not unpause the game, only !forceunapuse will unpause the game)

CVARS

l4d2_pause_alltalk "1"
Turns Alltalk on when paused
// -
// Default: "1"

l4d2_pause_force_only "0"
Only allow force pauses
// Default: "0"

l4d2_pause_request_timout "10.0"

How long the pause request should be visible
// Default: "10.0"
// Minimum: "5.000000"
// Maximum: "30.000000"

NOTES

To allow people to leave and join whilst paused, the game will quickly unpause and repause when...
- PlayerChangeTeam
- OnClientConnected
- OnClientPutInServer
- OnClientDisconnect

This is the only way to allow people to leave and join at the moment.

Versions

1.0.0 - Initial release
1.1.0 - Silver added some lovely freeze code and added god mode whilst paused.
1.2.0 - Fixed compile warnings and errors to make it work with latest sourcemod.

Yours
N3wton

honorcode23 09-09-2010 07:54

Re: [L4D2] Pause
 
I didn't understand this cvar:

l4d2_pause_force_only "0"
Only allow force pauses
// Default: "0"

Can you explain me it a bit? :P

Btw, awesome plugin, i had the issues were people couldn't join the server while paused, and that was anoying. Thanks.

n3wton 09-09-2010 08:01

Re: [L4D2] Pause
 
Basically, there are two ways of pausing...

!pause (everyone can use this command, and opens a vote, if the vote is greater than 50% the game is paused)

!forcepause (only admins with a kick flag or higher can use, it pauses the game instantly)

if l4d2_pause_force_only is "1" the game can only be paused using !forcepause, if l4d2_pause_force_only is "0" then either !pause or !forcepause can be used.

Yours
N3wton

Silvers 09-10-2010 10:45

Re: [L4D2] Pause
 
Thanks for releasing N3wton!

This plugin also stops these annoying messages from the console when someone opens and closes the menu/console. Nice bonus for using this!
[IMG]http://img689.**************/img689/6858/consolela.png[/IMG]

honorcode23 09-10-2010 10:46

Re: [L4D2] Pause
 
Quote:

Originally Posted by n3wton (Post 1295589)
Basically, there are two ways of pausing...

!pause (everyone can use this command, and opens a vote, if the vote is greater than 50% the game is paused)

!forcepause (only admins with a kick flag or higher can use, it pauses the game instantly)

if l4d2_pause_force_only is "1" the game can only be paused using !forcepause, if l4d2_pause_force_only is "0" then either !pause or !forcepause can be used.

Yours
N3wton

Alright thanks.

step 09-13-2010 03:45

Re: [L4D2] Pause
 
Good job :)

Glide Loading 09-14-2010 13:04

Re: [L4D2] Pause
 
Quote:

Originally Posted by n3wton (Post 1295589)
I am looking into to doing a manual pause, in which I force every entity in the game to freeze and disable the director...

How about future that used in this plugins ?
http://forums.alliedmods.net/showthread.php?p=1239108
http://forums.alliedmods.net/showthread.php?p=1238319

I mean why don't just "stop time" on server ?

n3wton 09-14-2010 19:02

Re: [L4D2] Pause
 
Quote:

How about future that used in this plugins ?
http://forums.alliedmods.net/showthread.php?p=1239108
http://forums.alliedmods.net/showthread.php?p=1238319

I mean why don't just "stop time" on server ?
Thanks for the idea, unfortunately, stopping the time also stops all sourcemod timer... meaning its impossible to come out of being paused... but I have used the zed time, but instead of stopping time, made it reallllllly slow, so in the unpauses your screen wont move...

However, this may also mean that clients don't have enough time to join... I haven't tested yet... So ill let you know.

Yours
N3wton

n3wton 10-08-2010 11:21

Re: [L4D2] Pause
 
1 - i left out sm_forcepause on perpose, because if there are two admins in a game, and they both type !forcepause then it will pause and unpause instantally... same for unpausing, so i thought it was a stupid idea....

2 - I didnt use colors because it won't compile on the forums. which is a pain, thus also stupid....

yours
n3wton

Scooter789 10-17-2010 23:54

Re: [L4D2] Pause
 
Would there be a way to play music during a pause, and stop the music once it's unpaused?

I had a team discussing this when we had the game paused and waiting, and I was wondering if there was a way to make it work.


All times are GMT -4. The time now is 20:21.

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