Raised This Month: $7 Target: $400
 1% 

[TF2] Black hole rockets [1.2] [1/31/2017]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Plugin ID:
5076
Plugin Version:
1.2
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    10 
    Plugin Description:
    Creates a black hole on rocket detonation
    Old 03-05-2016 , 17:15   [TF2] Black hole rockets [1.2] [1/31/2017]
    Reply With Quote #1

    [TF2] Black hole rockets v.1.2


    Introduction:
    Quote:
    Ever wanted to be an abusive admin? Well now's your chance.
    With 5 easy steps you can piss off your players! Guaranteed or your money back!
    Dependency:
    Quote:
    • Sourcemod 1.8+
    • Metamod 1.10+
    • Morecolors to compile
    Convars:
    Quote:
    • sm_blackhole_enabled (default: 1) - Enable/Disable this plugin
    • sm_blackhole_radius (default: 150.0) - Radius of pull
    • sm_blackhole_pullforce (default: 200.0) - Force of the pull
    • sm_blackhole_damage (default: 50.0) - Damage the black hole does per second
    • sm_blackhole_inner_radius (default: 80.0) - Radius to start doing damage/teleporting them?
    • sm_blackhole_duration (default: 3.0) - How long black hole stays, keep it low around 3-5 seconds
    • sm_blackhole_shake (default: 1) - Shake the client when near the black hole
    • sm_blackhole_critical (default: 0) - If set to 1, black hole only active when shot is critical
    • sm_blackhole_ff (default: 0) - If set to 1, black hole rockets will effect teammates
    Commands:
    Quote:
    • sm_blackhole <client> <1-on 0-off> (ADMIN_GENERIC)
    • sm_bh <client <1-on 0-off> (ADMIN_GENERIC)
    • sm_blackholeme (Public command: Use admin overrides to override this flag to prevent public use)
    • sm_bhme (Public command: Use admin overrides to override this flag to prevent public use)
    • sm_setbh (Public command, use admin override) - Set the end point location for blackhole, blackhole will teleport instead of doing damage
    • sm_resetbh (Public Command, use admin override) - Reset the end point location for blackhole, blackhole will start doing damage
    Installation:
    Quote:
    • Place blackhole.smx to addons/sourcemod/plugins/
    • Place blackhole.cfg to addons/sourcemod/configs/
    Changelog:
    Quote:
    1.2 -
    • No longer manually caching convar values, convar values are already cached
    • Uses GetEngineTime to end a timer instead of tracking the timer with a variable
    • For some reason i had DataPack WriteCell() on a float value, switched to WriteFloat()
    • Fixed Client 0 is invalid error for sm_blackhole/sm_bh
    • Console can no longer use sm_blackholeme/sm_bhme/sm_setbh/sm_resetbh
    1.1 -
    • Fixed issue with multiple black holes having issue with each other
    • Fixed issue with black holes still pulling players even though the particles disapeared
    • Change the shaking effect to usermessages instead of faking client commands
    • Added !setbh which will set the blackhole teleport end location to where your standing, blackholes no longer do damage
    • Added !resetbh which will clear the blackhole teleport end location and blackholes will start doing damage
    • Added sm_blackhole_ff which if set to 1 will effect teammates
    • For consistency, sm_blackhole_damage_radius was renamed to sm_blackhole_inner_radius
    1.0 - Released
    Download
    Source
    __________________

    Last edited by Chaosxk; 04-29-2017 at 16:23.
    Chaosxk is offline
    Naydef
    Senior Member
    Join Date: Dec 2015
    Location: Doom Town, Nevada
    Old 03-05-2016 , 17:34   Re: [TF2] Black hole rockets [1.0] [3/5/2016]
    Reply With Quote #2

    Amazing! I will use this plugin. Is it possible to add end destination for the hole?
    __________________
    My plugins:
    *None for now*


    Steam:
    naydef
    Naydef is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 03-05-2016 , 17:41   Re: [TF2] Black hole rockets [1.0] [3/5/2016]
    Reply With Quote #3

    Quote:
    Originally Posted by Naydef View Post
    Amazing! I will use this plugin. Is it possible to add end destination for the hole?
    At the moment, this plugin just hurts the player and removes ragdoll on death but i guess i can add a command to set a destination before you shoot.
    __________________
    Chaosxk is offline
    Mr.Orion
    Senior Member
    Join Date: Apr 2012
    Location: In my microwave.
    Old 03-17-2016 , 07:58   Re: [TF2] Black hole rockets [1.0] [3/5/2016]
    Reply With Quote #4

    The only problems that I've seen so far are :
    - Only the newest black hole pulls players.
    - Blackholes will still be active (without particles) until they all disappear (or something like that anyway).
    __________________
    Mr.Orion is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 03-17-2016 , 19:19   Re: [TF2] Black hole rockets [1.0] [3/5/2016]
    Reply With Quote #5

    What do you mean by the 2nd problem, can you explain further?
    __________________
    Chaosxk is offline
    Mr.Orion
    Senior Member
    Join Date: Apr 2012
    Location: In my microwave.
    Old 03-18-2016 , 03:21   Re: [TF2] Black hole rockets [1.0] [3/5/2016]
    Reply With Quote #6

    Well, so, what happens is : I create multiple black holes at different locations with ~1 second of interval each.
    Then, the first bug encountered takes place and sometime it's a different black hole that pulls (and damages) me in. (I get pulled by the 2 black holes at different times)
    After a few seconds, the black holes begin to disappear one by one, at this moment the black hole where I'm stuck in disappears and, even though it's gone, I can't get out of it because some black holes are still active.

    I guess that's it, there are like ghost-black holes that are still active until they are all gone.
    __________________

    Last edited by Mr.Orion; 03-18-2016 at 03:25.
    Mr.Orion is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 04-24-2016 , 22:56   Re: [TF2] Black hole rockets [1.1] [4/24/2016]
    Reply With Quote #7

    New update 1.1
    Code:
    - Fixed issue with multiple black holes having issue with each other
    - Fixed issue with black holes still pulling players even though the particles disapeared
    - Change the shaking effect to usermessages instead of faking client commands
    - Added !setbh which will set the blackhole teleport end location to where your standing, blackholes no longer do damage
    - Added !resetbh which will clear the blackhole teleport end location and blackholes will start doing damage
    - Added sm_blackhole_ff which if set to 1 will effect teammates
    - For consistency, sm_blackhole_damage_radius was renamed to sm_blackhole_inner_radius
    __________________

    Last edited by Chaosxk; 04-24-2016 at 22:56.
    Chaosxk is offline
    Mr_panica
    Senior Member
    Join Date: Jan 2017
    Location: Russia, Saint-Petersburg
    Old 01-30-2017 , 20:33   Re: [TF2] Black hole rockets [1.1] [4/24/2016]
    Reply With Quote #8

    I have a problem.
    When I turn sm_blackhole command through the console, I get an error:

    sm_rcon sm_blackhole @blue
    L 01/31/2017 - 04:536: [SM] Native "IsClientInGame" reported: Client index 0 is invalid
    L 01/31/2017 - 04:536: [SM] Displaying call stack trace for plugin "blackhole.smx":
    L 01/31/2017 - 04:536: [SM] [0] Line 191, blackhole.sp::Command_SetBlackHole()


    Sorry for my English
    Mr_panica is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 01-30-2017 , 21:03   Re: [TF2] Black hole rockets [1.1] [4/24/2016]
    Reply With Quote #9

    *pops head in*

    Mr_panica is right, it's checking if the client who uses sm_blackhole is in game. Did you really mean to do that or was that a copy/paste error from sm_blackholeme ?

    As a side note, you need to check if a client is index 0 if you want to check if it's the server console because IsClientInGame errors out for index 0.
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 01-30-2017 at 21:04.
    Powerlord is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 01-31-2017 , 00:30   Re: [TF2] Black hole rockets [1.2] [1/31/2017]
    Reply With Quote #10

    Yeah i probably c/p it from sm_blackholeme, removed IsClientInGame check from sm_blackhole/sm_bh so that console can use that command and did a !client check for the sm_blackhole ...etc commands.

    Here is v.1.2 changelog:
    Code:
     - No longer manually caching convar values, convar values are already cached
     - Uses GetEngineTime to end a timer instead of tracking the timer with a variable
     - For some reason i had DataPack WriteCell() on a float value, switched to WriteFloat()
     - Fixed Client 0 is invalid error for sm_blackhole/sm_bh
     - Console can no longer use sm_blackholeme/sm_bhme/sm_setbh/sm_resetbh
    __________________

    Last edited by Chaosxk; 01-31-2017 at 00:32.
    Chaosxk 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 02:16.


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