AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Player Unstick (https://forums.alliedmods.net/showthread.php?t=110041)

CUatTHEFINISH 11-24-2009 05:08

[L4D2] Player Unstick
 
2 Attachment(s)
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

tryptonaut 11-24-2009 05:26

Re: [L4D2] Player Unstick
 
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.

CUatTHEFINISH 11-24-2009 05:27

Re: [L4D2] Player Unstick
 
Hang on, checking into it now.

tryptonaut 11-24-2009 05:35

Re: [L4D2] Player Unstick
 
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.

CUatTHEFINISH 11-24-2009 05:38

Re: [L4D2] Player Unstick
 
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

tryptonaut 11-24-2009 05:45

Re: [L4D2] Player Unstick
 
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!

CUatTHEFINISH 11-24-2009 05:49

Re: [L4D2] Player Unstick
 
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!

shizzleL4D 11-24-2009 14:19

Re: [L4D2] Player Unstick
 
it works :D , Haven't tried it when the person actually gets stuck yet though.

CUatTHEFINISH 11-24-2009 15:10

Re: [L4D2] Player Unstick
 
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.

tryptonaut 11-24-2009 15:48

Re: [L4D2] Player Unstick
 
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.


All times are GMT -4. The time now is 02:12.

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