Thread: [TF2] Stun Mod
View Single Post
Author Message
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 05-15-2010 , 04:58   [TF2] Stun Mod
Reply With Quote #1

[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
Attached Files
File Type: sp Get Plugin or Get Source (Stunmod.sp - 5599 views - 8.0 KB)
__________________

Last edited by DarthNinja; 08-15-2011 at 13:50. Reason: Update to 1.4.4.7
DarthNinja is offline