Raised This Month: $12 Target: $400
 3% 

[L4D2] Pause


Post New Thread Reply   
 
Thread Tools Display Modes
Author
n3wton
Senior Member
Join Date: Mar 2010
Plugin ID:
1945
Plugin Version:
1.0.0
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Pause l4d2 with a vote menu, or forcepause by admins
    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 - 667 views - 14.4 KB)
    File Type: smx [L4D2] Pause.smx (9.6 KB, 252 views)

    Last edited by n3wton; 09-27-2020 at 06:34.
    n3wton is offline
    honorcode23
    BANNED
    Join Date: Mar 2010
    Location: Chile
    Old 09-09-2010 , 07:54   Re: [L4D2] Pause
    Reply With Quote #2

    I didn't understand this cvar:

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

    Can you explain me it a bit?

    Btw, awesome plugin, i had the issues were people couldn't join the server while paused, and that was anoying. Thanks.
    honorcode23 is offline
    n3wton
    Senior Member
    Join Date: Mar 2010
    Old 09-09-2010 , 08:01   Re: [L4D2] Pause
    Reply With Quote #3

    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
    n3wton is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 09-10-2010 , 10:45   Re: [L4D2] Pause
    Reply With Quote #4

    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]
    __________________
    Silvers is offline
    honorcode23
    BANNED
    Join Date: Mar 2010
    Location: Chile
    Old 09-10-2010 , 10:46   Re: [L4D2] Pause
    Reply With Quote #5

    Quote:
    Originally Posted by n3wton View Post
    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.
    honorcode23 is offline
    step
    Senior Member
    Join Date: May 2010
    Old 09-13-2010 , 03:45   Re: [L4D2] Pause
    Reply With Quote #6

    Good job :)
    step is offline
    Glide Loading
    Member
    Join Date: May 2010
    Old 09-14-2010 , 13:04   Re: [L4D2] Pause
    Reply With Quote #7

    Quote:
    Originally Posted by n3wton View Post
    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 ?
    Glide Loading is offline
    n3wton
    Senior Member
    Join Date: Mar 2010
    Old 09-14-2010 , 19:02   Re: [L4D2] Pause
    Reply With Quote #8

    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 is offline
    n3wton
    Senior Member
    Join Date: Mar 2010
    Old 10-08-2010 , 11:21   Re: [L4D2] Pause
    Reply With Quote #9

    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
    n3wton is offline
    Scooter789
    Junior Member
    Join Date: Apr 2009
    Old 10-17-2010 , 23:54   Re: [L4D2] Pause
    Reply With Quote #10

    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.
    Scooter789 is offline
    Reply


    Thread Tools
    Display Modes

    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 11:34.


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