Raised This Month: $32 Target: $400
 8% 

[L4D2] Pause


Post New Thread Reply   
 
Thread Tools Display Modes
Author
pvtschlag
Member
Join Date: Nov 2009
Plugin ID:
1292
Plugin Version:
0.2.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Allows teams to pause the game when agreed on, and allows admins with ban permission to force the game to pause.
    Old 11-23-2009 , 22:10   [L4D2] Pause
    Reply With Quote #1

    Description:
    Allows teams to pause the game when agreed on, and allows admins with ban permission to force the game to pause.

    This plugin uses the built in pause function. This causes everything in the game to pause. Players that disconnected and reconnect during the pause will be met with a black screen, but they are still in the game and will be normal once the game is unpaused.

    Co-op games can only be paused by an admin, and versus/scavenger games require one person from each team to type !pause.

    I haven't tested this extensively, but so far it seems to work great. Any feedback would be appreciated. It should also work in L4D1, but that is completely untested. Don't know about other games or not, but I think at least !forcepause should work for some.

    Commands:
    !pause (sm_pause) - Used to send a pause request to the other team. Once the other teams accepts the game will be paused.
    !unpause (sm_unpause) - Used to unpause a game that was paused with !pause.
    !forcepause (sm_forcepause) - Used by admins to force the game to pause and unpause.

    CVars:
    l4d2pause_version - Plugin version
    l4d2pause_timeout (30.0) - The amount of time it takes an unaccepted pause request to expire. Setting to 0 causes them to never expire.
    l4d2pause_alltalk (0) - Set to 1 to enable alltalk while the game is paused.
    l4d2pause_forceonly (0) - Set to 1 to only allow the !forcepause command to be used. This makes pausing the game admin only.

    Changelog:
    * Version 0.2.1:
    -Fixed some more chat that didn't show
    -Added option for only allowing the !forcepause command
    * Version 0.2.0:
    -Chat is now forced to display during pause
    -Added option for enabling alltalk while game is paused
    -Added cvar to configure how long a pause request takes to timeout
    * Version 0.1.1:
    -Fixed typo
    -Added a timeout for pause requests
    -Pause requests now get reset when map ends
    * Version 0.1.0:
    -Initial Release
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2pause.sp - 9916 views - 13.8 KB)

    Last edited by pvtschlag; 11-25-2009 at 21:03.
    pvtschlag is offline
    billabonker
    Senior Member
    Join Date: May 2009
    Old 11-24-2009 , 00:05   Re: [L4D2] Pause
    Reply With Quote #2

    sounds cool!
    i'd like to see screenies pls!
    billabonker is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 11-24-2009 , 02:13   Re: [L4D2] Pause
    Reply With Quote #3

    Go ingame and hit F5 at any given moment.
    AtomicStryker is offline
    pvtschlag
    Member
    Join Date: Nov 2009
    Old 11-24-2009 , 05:18   Re: [L4D2] Pause
    Reply With Quote #4

    Taking a screenshot of it would be no different then any other screenshot with the exception of a paused message being in the middle of the screen.

    Made a few changes. See first post for download.

    Quote:
    * Version 0.1.1:
    -Fixed typo
    -Added a timeout for pause requests
    -Pause requests now get reset when map ends
    TODO:
    -Fix problem with people sometimes not being able to chat while game is paused
    -Add an option to temporary turn on alltalk while the game is paused
    -Add a cvar to allow server owners to change how long it takes for a pause request to timeout

    Last edited by pvtschlag; 11-24-2009 at 05:25.
    pvtschlag is offline
    shizzleL4D
    Member
    Join Date: Aug 2009
    Old 11-24-2009 , 14:16   Re: [L4D2] Pause
    Reply With Quote #5

    Works but yeah, chat doesn't work sometimes when it's paused.
    __________________

    shizzleL4D is offline
    uriel18
    Senior Member
    Join Date: Apr 2009
    Old 11-24-2009 , 16:47   Re: [L4D2] Pause
    Reply With Quote #6

    It says me that only and admin can pause the game in coop.

    How can I get admin privileges? (Itīs a LAN, me and my brother)
    __________________
    uriel18 is offline
    pvtschlag
    Member
    Join Date: Nov 2009
    Old 11-24-2009 , 19:08   Re: [L4D2] Pause
    Reply With Quote #7

    You need to add yourself as a sourcemod admin with the ban flag set. See http://wiki.alliedmods.net/Adding_Ad...28SourceMod%29 for information on how to do that. Once you have done that you have to use the !forcepause command for coop games.

    Added a few more changes. See first post for download.

    Quote:
    * Version 0.2.0:
    -Chat is now forced to display during pause
    -Added option for enabling alltalk while game is paused
    -Added cvar to configure how long a pause request takes to timeout

    Last edited by pvtschlag; 11-24-2009 at 19:13.
    pvtschlag is offline
    Downtown1
    Veteran Member
    Join Date: Mar 2004
    Old 11-25-2009 , 01:17   Re: [L4D2] Pause
    Reply With Quote #8

    Looks a lot like the pausing in Frustian's competitive plugin except you use 'setpause' instead of manual pausing? Even the forcepause and everything is there.

    Source of inspiration?
    Downtown1 is offline
    pvtschlag
    Member
    Join Date: Nov 2009
    Old 11-25-2009 , 01:35   Re: [L4D2] Pause
    Reply With Quote #9

    Yea, I used Frustian's plugin on my server in L4D1. One of the first things my friends asked me when we started playing L4D2 was if we could pause the game. So as soon as sourcemod for L4D2 went public I decided to see about using the built in pause function as the core of a pause plugin. This was so even time sensitive things like scavenge matches are paused without error.

    I went with similar commands to keep things simple and familiar to players. Frustian's plugin is definitely what triggered me to make this plugin.

    I'm actually hoping to have it trigger like any other vote in the future, except maybe only one check mark per team in the vote box, or even a vote similar to how the "Rematch" votes work in L4D2 now. Of course, it would still require a command to start the vote, but once started players would be able to simply hit F1/F2 to vote on it.

    Last edited by pvtschlag; 11-25-2009 at 01:38.
    pvtschlag is offline
    Gixxer
    Member
    Join Date: Nov 2009
    Old 11-25-2009 , 11:51   Re: [L4D2] Pause
    Reply With Quote #10

    Chat is still missing sometimes, but overall it works.
    Gixxer is offline
    Reply



    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 07:49.


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