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

[L4D2] - ready up reloaded


Post New Thread Reply   
 
Thread Tools Display Modes
Author
jess
Member
Join Date: Aug 2015
Location: mb
Plugin ID:
4861
Plugin Version:
1.a.1
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    based off of another author's abandoned plugin code.
    Old 10-20-2015 , 15:32   [L4D2] - ready up reloaded
    Reply With Quote #1

    Ready Up - Reloaded
    alpha version


    IMPORTANT INFORMATION: This is an alpha release. It is untested; I don't have a left 4 dead 2 server or the game installed. Any server operators who can help to test the plugin and report errors would be greatly appreciated! This is my first plugin and is based off of source code from both Downtown1's ready up and Skyy's ready up.

    Description: After seeing a demand for a ready up type of plugin still for left 4 dead 2, and both versions I found abandoned, I decided to try to write my own. This plugin should correct many of the problems with other ready up plugins, at least when it is no longer in alpha or beta version.

    Installation: My plugin has only one dependency. You must have Left 4 Downtown 2, and you can get it over here: https://forums.alliedmods.net/showthread.php?t=134032
    Download the readyup-reloaded_alpha.zip located at the bottom of this post, and extract the contents to /left4dead2/addons/sourcemod/
    Plugin directories have already been setup to mirror the sourcemod installation directory.

    Usage: The Ready Up Reloaded plugin consists of a core file that provides a few natives. It also has some functionality in case there are no other plugins running that are utilizing ready up natives. The order is as follows without any plugins altering its course:

    OnFirstClientLoaded() -> OnAllClientsLoaded() -> OnReadyUpStart()* -> OnReadyUpEnd()* -> OnRoundStart() -> OnRoundEnd() -> OnMapAboutToEnd()**
    *Two forwards can be forced at any time (as long as they have not fired, yet) by another plugin. These are OnReadyUpStart, which can be called even before OnFirstClientLoaded, and OnReadyUpEnd, which can only be called once OnReadyUpStart has fired.
    **OnMapAboutToEnd fires immediately after OnRoundEnd if it's the last round of the map or when the survivors in coop have successfully completed the map.
    Please Note: OnReadyUpStart automatically triggers when the round resets; the teams swap in versus, or all players respawn in coop.

    Plugins: The following plugins use the natives and forwards in this plugin, so they require it to work. They are both in the zip on this post. I have also included my own version of a dynamic server slot plugin, that does not require this plugin or any other plugin to work.

    Ready Up - Timer - Adds a timer to the pre-game ready up period to determine when ready up ends. It will create a config in /cfg/sourcemod/
    Ready Up - Rotation - Adds a map rotation to the server. It also includes an option to enable/disable player map voting during the finale. It requires an already-existing config in /left4dead2/addons/sourcemod/configs/ named rur_rotation.cfg
    Ready Up - RPG - With the framework currrently in-development and available at !--- 162.248.92.192:27015 ready up development ---! for testing, via the !rpg command - however, it currently does not require ready-up-reloaded to function!



    Code:
    sm_readyup_timer_pregame - how many seconds (integer) until ready up period is ended after all players join the game.
    sm_readyup_timer_readyup - if it is 1 then players can say !ready to   toggle their ready status from on and off. Otherwise they have to wait   the entire pregame time.
    rur_maprotation_voting -  if 1, voting for the next  campaign is allowed using !mapvote, otherwise  the next campaign will  be in the rotation. Voting can occur at any time  during the final level  of a campaign, and players can recast their ballot at any time.
    rur_maprotation_delay - Default is 3 seconds. Will display a notice to players in chat of next map and how long until it loads. sm_dynamicslots_playable - the number of players who can actually play in the server. It adds spectator count to this.
    sm_dynamicslots_kicking - if 1, we kick the player with the shortest  play time, otherwise the player with the longest playtime.


    Forwards: My plugin provides several useful (to left 4 dead 2) natives and forwards for left4dead2 plugin developers. I've copied the readyup.inc file to list them below.
    PHP Code:
    /*
     *
     *        This forward is triggered, immediately, when any survivor player leaves the safe area
     *        for the first time, but ONLY after OnReadyUpEnd has fired. Otherwise the player will just be
     *        teleported back into the safe area.
     *
     */
    forward OnRoundStart();

    /*
     *
     *        When the survivors successfully clear a level in campaign, as well as when a round ends
     *        in versus or survival, this forward will be called.
     *
     */
    forward OnRoundEnd();

    /*
     *
     *        Triggers when the first connected user triggers OnClientPostAdminCheck on a new map.
     *        This will only trigger ONE TIME per map, and will not trigger for a user that disconnects
     *        prior to this stage.
     *
     */
    forward OnFirstClientLoaded();

    /*
     *
     *        Triggers when the last connecting client successfully clears OnClientPostAdminCheck. When
     *        a client disconnects from the server, if OnAllClientsLoaded hasn't already been called, it
     *        will check to see if all clients have loaded.
     *
     */
    forward OnAllClientsLoaded();

    /*
     *
     *        This forward is triggered when all clients have successfully loaded or, in versus game-types
     *        after a round ends, and when teams have switched sides. This forward fires BEFORE OnRoundStart().
     *        NOTE:    This forward can be forced by another plugin using the OnReadyUpStartEx native, and can be
     *                forced at any time, even before OnFirstClientLoaded has fired.
     *
     */
    forward OnReadyUpStart();

     
    /*
      *
      *        This forward is fired when the first survivor player leaves the safe area AFTER OnReadyUpEnd has fired.
      *        Note:    It will ALWAYS fire before OnRoundStart, but immediately before if the core plugin is allowed to fire
      *                OnReadyUpEnd. However, if another plugin called OnReadyUpEndBlock, this forward will only fire when
      *                another plugin calls it, so it's important that a plugin actually call it if the core plugin is blocked
      *                from calling it, itself, otherwise the ready up period will never end.
      *
      */
    forward OnReadyUpEnd();

    /*
     *
     *    This forward is called when the last round is completed on a map in versus, or when the survivors in coop
     *    successfully clear the level.
     *
     */
    forward OnMapAboutToEnd(); 
    Natives:
    PHP Code:
    /*
      *
      *        This native allows a plugin to force OnreadyUpStart to fire in the core plugin.
      *        Note:    Forcing it in this way only works if it hasn't already been called by the core plugin.
      *
      */
     
    native OnReadyUpStartEx();

     
    /*
      *
      *        This native allows a plugin to force OnReadyUpEnd to fire. This is useful if a plugin has disabled the core plugins
      *        ability to fire OnReadyUpEnd. Correction, it's not useful in this scenario, it's required.
      *
      */
     
    native OnReadyUpEndEx();

     
    /*
      *
       *        This native allows a plugin to prevent the core ready up  plugin from being able to end the ready up period. This means
      *         that another plugin must call OnReadyUpEndEx to end the ready up  period at some point, or the round will obviously never begin.
      *
      */
     
    native OnReadyUpEndBlock();

     
    /*
      *
       *        No explanation needed, here... It really just gives the ready  up core plugin back the ability to end the ready up period without
       *        another plugin having to force it to fire. If a plugin takes  away ready up core's ability to do this, it's important to call this
      *        native if a plugin that blocks it unloads, for any reason.
      *
      */
     
    native OnReadyUpEndAllow(); 
    Other Notes / Extra Reminders: Should have edited this a while a go! Fully tested, working on dev server. If feedback, let me know, thanks!
    Attached Files
    File Type: zip readyup_r1.a.1.zip (32.2 KB, 627 views)

    Last edited by jess; 12-10-2015 at 09:39. Reason: text
    jess is offline
    psycki
    BANNED
    Join Date: Aug 2013
    Location: https://t.me/pump_upp
    Old 10-22-2015 , 13:39   Re: [L4D2] - ready up reloaded
    Reply With Quote #2

    on windows i receve this error.
    missing this file? the plugin not creating this cfg

    [SM] Native "SetFailState" reported: I cannot find addons\sourcemod\configs\readyup_core.cfg and I really need this file...
    [SM] Displaying call stack trace for plugin "rur_core.smx":
    [SM] [0] Line 548, E:\readyup reloaded\scripting\rur_core.sp::OnConfigsExec uted()
    [SM] Native "GetClientInfo" reported: Client 1 is not connected
    psycki is offline
    Send a message via ICQ to psycki Send a message via AIM to psycki Send a message via Yahoo to psycki
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 10-22-2015 , 14:38   Re: [L4D2] - ready up reloaded
    Reply With Quote #3

    Quote:
    Originally Posted by psycki View Post
    on windows i receve this error.
    missing this file? the plugin not creating this cfg

    [SM] Native "SetFailState" reported: I cannot find addons\sourcemod\configs\readyup_core.cfg and I really need this file...
    [SM] Displaying call stack trace for plugin "rur_core.smx":
    [SM] [0] Line 548, E:\readyup reloaded\scripting\rur_core.sp::OnConfigsExec uted()
    [SM] Native "GetClientInfo" reported: Client 1 is not connected

    Thank-you for bringing this to my attention.
    I had decided to change the naming convention used but did not completely update it. I have uploaded a new archive containing the update to the rur_core.sp and rur_core.smx. Now, the rur_core.cfg should function correctly. Files in the /addons/sourcemod/configs/ folder won't auto-generate, still, though.
    jess is offline
    psycki
    BANNED
    Join Date: Aug 2013
    Location: https://t.me/pump_upp
    Old 10-22-2015 , 17:21   Re: [L4D2] - ready up reloaded
    Reply With Quote #4

    more info

    dynamicslots
    sometimes one of the survivors turns up dead at the beginning of the map.
    also does not meet the stipulated limits (at least for infected bot)
    you set up eight, and it shows nine, sometimes 10

    rur_readyup_rotation
    I'm not sure if he should show some warning, or voting menu, but it does not show anything at the end of the match.

    rur_core/rur_readyup_timer
    I believe they are responsible for releasing and freezing of the players.
    it displays the message "ready up" initial but no freezes or crashes the players, the command! "ready" works but has no effect on either lock or freeze the players, or lock the door.


    remembering that my feedback is based on windows I can not say that the same applies to linux. to help in anything, that's what I use MetaMod: Source v1.10.6V, Stripper v1.2.2, v1.7.3 SourceMod-dev + 5265, windows10

    and congratulations for the great job.
    psycki is offline
    Send a message via ICQ to psycki Send a message via AIM to psycki Send a message via Yahoo to psycki
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 10-23-2015 , 04:32   Re: [L4D2] - ready up reloaded
    Reply With Quote #5

    Hello, psycki!

    Thank-you for the information. I have some feedback regarding it!

    My apologies, I should have tried to explain my version of ready up changes. This plugin will not lock a player in place or prevent a player from opening the safe room door. What it should do is prevent players from leaving the safe area. If they leave, it should teleport them back in and not begin the round. When pregame ends, players should be able to play as normal. Please let me know if this is not working.

    For rotation.smx I have added rur_maprotation_delay with a default of "3" for 3 seconds. It will notify to players that the level is changing (and to what) and how long until the map changes.

    For dynamicslots.smx I have edited the code to no longer kick bots. Hopefully this resolves the player dead issue.
    jess is offline
    jessyaab
    Junior Member
    Join Date: Jun 2015
    Old 10-23-2015 , 14:01   Re: [L4D2] - ready up reloaded
    Reply With Quote #6

    hi!!

    You can updgrade this plugin too?

    https://forums.alliedmods.net/showth...=253432&page=2

    I'm trying using in my server, but i have some troubles
    jessyaab is offline
    psycki
    BANNED
    Join Date: Aug 2013
    Location: https://t.me/pump_upp
    Old 10-23-2015 , 15:24   Re: [L4D2] - ready up reloaded
    Reply With Quote #7

    more feedback ^^

    dynamicslots.smx
    the bot problem dead at the beginning of the match was solved and works fine. tks for that

    rur_readyup_rotation.smx
    this has not been fully resolved, now he already shows the message in of the final map that early voting is allowed. but it still does not show any menu or list with the names of the maps for voting. also not accepted the command "!mapvote" (does not return an error message) "!votemap + mapname" also does not make any effect or response.
    doubts mine.
    he should work in a similar way to this? whith "automatic change map"
    http://forums.alliedmods.net/showthread.php?t=156392

    rur_readyup_timer.smx/rur_core.smx
    it also is not working properly. it shows the initial message but not teleports as you mentioned. the command "!ready" is working well, it shows "ready" "unready" but has no effect on the survivors.

    maybe this will help or can prevent any future bug the configs are generating so: readyup_rotation.cfg.cfg, readyup_timer.cfg.cfg, sm_dynamicslots.cfg.cfg

    Last edited by psycki; 10-23-2015 at 15:39. Reason: add info
    psycki is offline
    Send a message via ICQ to psycki Send a message via AIM to psycki Send a message via Yahoo to psycki
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 10-28-2015 , 18:12   Re: [L4D2] - ready up reloaded
    Reply With Quote #8

    1. I have updated the files to no longer include .cfg in the name of the files.
    2. Addressed the other issues. Should teleport, and will need to setup a localserver to really start testing this.
    jess is offline
    jess
    Member
    Join Date: Aug 2015
    Location: mb
    Old 12-03-2015 , 15:39   Re: [L4D2] - ready up reloaded
    Reply With Quote #9

    ready up reloaded + ready up timer plugins have both been updated and fully tested. Working as intended with the latest left4downtown2 gamedata. readyup has never been more hassle-free.
    jess is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 12-03-2015 , 21:22   Re: [L4D2] - ready up reloaded
    Reply With Quote #10

    Quote:
    Originally Posted by jess View Post
    ready up reloaded + ready up timer plugins have both been updated and fully tested. Working as intended with the latest left4downtown2 gamedata. readyup has never been more hassle-free.
    Got this error
    L 12/03/2015 - 19:134: SourceMod error session started
    L 12/03/2015 - 19:134: Info (map "c5m1_waterfront") (file "errors_20151203.log")
    L 12/03/2015 - 19:134: [SM] Native "SetConVarString" reported: Invalid convar handle 0 (error 4)
    L 12/03/2015 - 19:134: [SM] Displaying call stack trace for plugin "rur_core.smx":
    L 12/03/2015 - 19:134: [SM] [0] Line 560, E:\readyup reloaded\scripting\rur_core.sp::OnConfigsExec uted()
    L 12/03/2015 - 19:136: Error log file session closed.
    Krufftys Killers 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 20:39.


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