Monthly Target: $400 Donations: $131
 32% 

[L4D2] Player Unstick


Post New Thread Reply   
 
Thread Tools Display Modes
Author
CUatTHEFINISH
Member
Join Date: Apr 2009
Plugin ID:
1293
Plugin Version:
1.0.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    32 
    Plugin Description:
    Allows players to get themselves unstuck from charger glitches and level clips
    Old 11-24-2009 , 06:08   [L4D2] Player Unstick
    Reply With Quote #1

    I've noticed (especially when playing Dead Center) playing versus, survivors can get stuck and will be unable to move. Slapping doesn't free them and sometimes they have to wait for help from an infected player gracious enough to assist. A plugin like this was made here: http://forums.alliedmods.net/showthread.php?p=508657. However, its randomized location will spawn you way outside of the map.

    This plugin will allow the user to type !stuck in chat and the plugin will teleport them a few inches away to help get them out of their predicament. It limits the user to only be able to do this twice on a map.

    I've adapted my code from this plugin here: http://forums.alliedmods.net/showthread.php?p=664214

    Commands:
    sm_unstick <name> - Admin command to unstick a player in game (Requires Generic Admin)
    !stuck - User command to unstick his/her self from being glitched

    Cvars:
    l4d2unstick_version - Version of the plugin
    l4d2unstick_teleports - (default 2) Amount of times the client can use !stuck per map.
    l4d2unstick_announce - (default 1) Announces at each new map that the !stuck command is available. 0 to turn off.

    Change log:
    • Version 1.0.6
      • Fixed one last logic issue when l4d2unstick_teleports is set to 0
    • Version 1.0.5
      • Fixed cvar bugs
      • Fixed logic issue when l4d2unstick_teleports is set to 0
    • Version 1.0.4
      • Fixed double announcement bug
      • Added a 3 second delay to the user !stuck command (admin cmd has no delay)
      • Added a check to prevent hanging players from using !stuck and causing them to fall
    • Version 1.0.3
      • Added sm_unstick admin command
      • Reduced teleport distance (from 10 units to 4)
      • Cleaned up code and added more documentation
      • Various text display fixes
    • Version 1.0.2
      • Bug fix to make !stuck work in all situations
    • Version 1.0.1
      • Now allows !stuck to be used in team or global chat
      • Added l4d2unstick_teleports cvar
      • Added plugin announcing and l4d2unstick_announce cvar
      • Internal documentation added to source code
    • Version 1.0
      • Initial public release
    To-Do:
    • Include a cvar to allow adjustment to how many teleports a user gets during a map -DONE (v 1.0.1)
    • Allow team chat to trigger the !stuck command - DONE (v 1.0.1)
    • Internal plugin announcement (Beginning of each campaign tell the user about the !stuck command)? - DONE (v 1.0.1)
    • Menu or console command that allows admins to unstick the affected player - DONE (v 1.0.3)
    • Tell users how many teleports they have left - DONE (v 1.0.3)
    • Clean up code (some warnings on compiling, doesn't effect plugin adversely) - DONE (v 1.0.3)
    • Check if client is snared and if so don't allow !stuck
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2unstick.sp - 3404 views - 6.1 KB)
    File Type: smx l4d2unstick.smx (6.1 KB, 1197 views)
    __________________

    Last edited by CUatTHEFINISH; 11-27-2009 at 01:39. Reason: Updated to 1.0.6
    CUatTHEFINISH is offline
    tryptonaut
    Junior Member
    Join Date: Nov 2009
    Old 11-24-2009 , 06:26   Re: [L4D2] Player Unstick
    Reply With Quote #2

    For some reason whenever I try to use this plugin it says I've used up all of my teleports this round.... even when it's my first time.
    tryptonaut is offline
    CUatTHEFINISH
    Member
    Join Date: Apr 2009
    Old 11-24-2009 , 06:27   Re: [L4D2] Player Unstick
    Reply With Quote #3

    Hang on, checking into it now.
    __________________
    CUatTHEFINISH is offline
    tryptonaut
    Junior Member
    Join Date: Nov 2009
    Old 11-24-2009 , 06:35   Re: [L4D2] Player Unstick
    Reply With Quote #4

    Fast reply, thanks! Also, it seems the trigger doesn't work on team chat. This plugin would help out a lot, three times in the past day I've had to noclip players to get them unstuck. Thanks for trying to address this issue.
    tryptonaut is offline
    CUatTHEFINISH
    Member
    Join Date: Apr 2009
    Old 11-24-2009 , 06:38   Re: [L4D2] Player Unstick
    Reply With Quote #5

    EDIT: Oh wait, hang on.. I think I just made it worse. It'll reset the arrays each time a client connects. Gimmie a second xD
    __________________
    CUatTHEFINISH is offline
    tryptonaut
    Junior Member
    Join Date: Nov 2009
    Old 11-24-2009 , 06:45   Re: [L4D2] Player Unstick
    Reply With Quote #6

    Once again thanks for the quick replies. I need to go to bed, I look forward to using this plugin when I come home from work tomorrow!
    tryptonaut is offline
    CUatTHEFINISH
    Member
    Join Date: Apr 2009
    Old 11-24-2009 , 06:49   Re: [L4D2] Player Unstick
    Reply With Quote #7

    Yep it's all working now. I had a person come in with me and test. Gives each person two goes before it cuts them off. And no problem. I hope it works out for you!
    __________________
    CUatTHEFINISH is offline
    shizzleL4D
    Member
    Join Date: Aug 2009
    Old 11-24-2009 , 15:19   Re: [L4D2] Player Unstick
    Reply With Quote #8

    it works , Haven't tried it when the person actually gets stuck yet though.
    __________________

    shizzleL4D is offline
    CUatTHEFINISH
    Member
    Join Date: Apr 2009
    Old 11-24-2009 , 16:10   Re: [L4D2] Player Unstick
    Reply With Quote #9

    Good to hear, keep me posted. I've only been able to get it to happen once and test since writing this plugin, but in theory it should work everytime and without an issue. Any feedback is very helpful. I'm hoping I don't have to tweak the position shift at all and I can move on to code clean up and additional features.

    EDIT: I've coded team chat functionality and a teleport # cvar, but I'll release it when I get a good solid chance to test it out tonight. Went through and also added internal documentation, the source file was seriously lacking in that department.
    __________________

    Last edited by CUatTHEFINISH; 11-24-2009 at 16:47.
    CUatTHEFINISH is offline
    tryptonaut
    Junior Member
    Join Date: Nov 2009
    Old 11-24-2009 , 16:48   Re: [L4D2] Player Unstick
    Reply With Quote #10

    Awesome! The plugin works now - it gives the player 2 times to use the command per round and moves you an inch or two.

    I'll let you know if it actually fixes people being stuck though.
    tryptonaut 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 08:03.


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