Thread: [L4D2] Pause
View Single Post
Author Message
n3wton
Senior Member
Join Date: Mar 2010
Old 09-09-2010 , 06:03   [L4D2] Pause
Reply With Quote #1

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
Attached Files
File Type: sp Get Plugin or Get Source ([L4D2] Pause.sp - 695 views - 14.4 KB)
File Type: smx [L4D2] Pause.smx (9.6 KB, 272 views)

Last edited by n3wton; 09-27-2020 at 06:34.
n3wton is offline