Raised This Month: $182 Target: $400
 45% 

[TF2] Stun Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Plugin ID:
1666
Plugin Version:
1.4.4.7
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    199 
    Plugin Description:
    Stuns or "scares" players like the ghost in Harvest or the End-round humiliation period.
    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 - 3186 views - 8.0 KB)
    __________________

    Last edited by DarthNinja; 08-15-2011 at 13:50. Reason: Update to 1.4.4.7
    DarthNinja is offline
    scopesp
    Senior Member
    Join Date: Jan 2009
    Location: Munich
    Old 05-15-2010 , 07:40   Re: [TF2] Stun Mod
    Reply With Quote #2

    funny one anyway possible add in admin menu under playercommands ?

    thanks
    scopesp is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Location: Source SDK
    Old 05-15-2010 , 13:40   Re: [TF2] Stun Mod
    Reply With Quote #3

    Lol nice release.
    Really appreciate it. Any chance of adding a !stunme or a !gstun me so the player needs to respawn in order to remove it?

    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.

    Last edited by Sreaper; 05-15-2010 at 13:50.
    Sreaper is offline
    Wazz
    SourceMod Donor
    Join Date: Mar 2009
    Old 05-15-2010 , 14:13   Re: [TF2] Stun Mod
    Reply With Quote #4

    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.
    Wazz is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Location: Source SDK
    Old 05-15-2010 , 14:18   Re: [TF2] Stun Mod
    Reply With Quote #5

    Quote:
    Originally Posted by Wazz View Post
    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

    Last edited by Sreaper; 05-15-2010 at 14:23.
    Sreaper is offline
    Wazz
    SourceMod Donor
    Join Date: Mar 2009
    Old 05-15-2010 , 14:39   Re: [TF2] Stun Mod
    Reply With Quote #6

    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.
    Wazz is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Location: Source SDK
    Old 05-15-2010 , 15:27   Re: [TF2] Stun Mod
    Reply With Quote #7

    Quote:
    Originally Posted by Wazz View Post
    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
    Sreaper is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 05-15-2010 , 22:27   Re: [TF2] Stun Mod
    Reply With Quote #8

    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 is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 05-16-2010 , 03:33   Re: [TF2] Stun Mod
    Reply With Quote #9

    ~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)
    __________________
    DarthNinja is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 05-16-2010 , 13:10   Re: [TF2] Stun Mod
    Reply With Quote #10

    Quote:
    Originally Posted by DarthNinja View Post
    ~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.
    psychonic 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 20:54.


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