AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Stun Mod (https://forums.alliedmods.net/showthread.php?t=126907)

DarthNinja 05-15-2010 04:58

[TF2] Stun Mod
 
1 Attachment(s)
[TF2] Stunmod
Version 1.4.4.7
Servers Running This Plugin



Description:
Allows admins to put a player into the surrender pose where they cannot shoot or jump, and move slowly.

The player can ether be "frightened" the same way they are when they touch the ghost in koth_harvest_event, or they can be be put into the end of round humiliation stance.

Check out the handy admin menu posted Here. (Thanks
j0sh77)

NOTE:
If you get the error "Native "TF2_StunPlayer" was not found" please update to SM 1.3.2 or newer.
Commands:
Admin:
sm_stun <Username/#ID> [Duration] - Puts player into normal losing pose.
sm_gstun <Username/#ID> [Duration] - Stuns the player like they walked into the ghost on Harvest.
sm_bonk <Username/#ID> [Duration] [Flag (1/2/3)] - Bonks the player as though they were hit by a baseball.

Client:
sm_stunme [Duration] - Player stuns himself
sm_gstunme [Duration] - Player ghost stuns himself
sm_bonkme [Duration] - Player bonks himself
Notes:
The [Duration] variable is optional, if not specified it will pull from the cvars below:
The client commands are enabled/disabled using the cvar below.

Cvars:
sm_stunmod_version -|- shows plugin version
sm_stunmod_selfstun -|- allow non-admins to use commands on themselves. (sm_stunme, etc) 1 = enabled, 0 = disabled.
sm_stunmod_cmd_timer -|- the duration to use if not specified in the command. (Default: 5 seconds).
sm_stunmod_player_timer -|- the duration for players to bonk themselves if they don't specify. (Default: 5 Seconds)
Install Instructions:
  1. Place Stunmod.smx into your addons/sourcemod/plugins/ folder.

Notes:
If you want to "toggle" the effect manually, just enter some really large number. Then to toggle off enter "0" for the number.

ToDo:
  • Add timer cvars for each stun command.

Version History:
  • V1.0.0.6
    • Initial Release
  • V1.3.2.7
    • Changed sm_stunmod_default cvar to sm_stunmod_cmd_timer
    • Added sm_bonk (emulates getting hit by a stunball)
    • Added sm_stunme, sm_gstunme, and sm_bonkme commands
    • Fixed timer cvar
    • Added timer cvar for stunme commands
    • Added cvar to enable/disable stunme commands
  • V1.3.3.7
    • Replaced PrintToChat with ShowActivity2
    • Removed some unused name-fetching code
  • V1.4.4.7
    • Code cleanup.
    • Plugin will now print group target names without spamming a line per player.
    • Now uses StunFlag defines.
    • Now registers sm_scare, sm_ghost, sm_scareme, and sm_ghostme as alts for sm_gstun.
    • sm_bonk now accepts a 3rd arg that specifies the bonk flag to use, although this doesn't appear to have an effect at the moment.
Based on the infos in This Thread. Thanks to Wazz for his plugin's example usage of CTF_StunPlayer.

Downloads since 6/9/10: 960

scopesp 05-15-2010 07:40

Re: [TF2] Stun Mod
 
funny one :) anyway possible add in admin menu under playercommands ?

thanks

Sreaper 05-15-2010 13:40

Re: [TF2] Stun Mod
 
Lol nice release. :D
Really appreciate it. Any chance of adding a !stunme or a !gstun me so the player needs to respawn in order to remove it? :crab:

Edit works perfect except I have this in my config

"sm_cvar sm_stunmod_default 86400"
(no quotes)

The stun only appears to last about half of a second but it definetly is what im looking for. Any fix for the time cvar?

86400 is the the amount of seconds in a day btw.

Wazz 05-15-2010 14:13

Re: [TF2] Stun Mod
 
Approximately 80 seconds is the maximum time a player can be stunned for. However this doesn't mean that you can't re-apply the stun.

Sreaper 05-15-2010 14:18

Re: [TF2] Stun Mod
 
Quote:

Originally Posted by Wazz (Post 1181126)
Approximately 80 seconds is the maximum time a player can be stunned for. However this doesn't mean that you can't re-apply the stun.

Thank's. Im guessing the maximum stun time is defined by the Team Fortress 2 itself?


EDIT: Tried 80, same result, tried 60, same result :(

Wazz 05-15-2010 14:39

Re: [TF2] Stun Mod
 
In answer to your first question, yes.
As for the bug it may just be a fault in the plugin; forgive the vague answer as I haven't looked at the code yet.

Sreaper 05-15-2010 15:27

Re: [TF2] Stun Mod
 
Quote:

Originally Posted by Wazz (Post 1181157)
In answer to your first question, yes.
As for the bug it may just be a fault in the plugin; forgive the vague answer as I haven't looked at the code yet.

Well alright, im sure Darth will fix it eventually. Hasn't let me down yet :P

DarthNinja 05-15-2010 22:27

Re: [TF2] Stun Mod
 
Haha I'm retarded.
I limited the timer cvar at 1 or 0.

I'll post a fix in a bit once I add the other things and test it.

DarthNinja 05-16-2010 03:33

Re: [TF2] Stun Mod
 
~Updated~

I'd be interested to know if sm_bonk can trigger achievements if someone could test that.
(The soldier "kill X stunned players" one to be exact)

psychonic 05-16-2010 13:10

Re: [TF2] Stun Mod
 
Quote:

Originally Posted by DarthNinja (Post 1181790)
~Updated~

I'd be interested to know if sm_bonk can trigger achievements if someone could test that.
(The soldier "kill X stunned players" one to be exact)

it can. i did it by accident once when testing.


All times are GMT -4. The time now is 11:20.

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