Raised This Month: $51 Target: $400
 12% 

[TF2] Spawn Bonus Ducks


Post New Thread Reply   
 
Thread Tools Display Modes
Author
404UserNotFound
BANNED
Join Date: Dec 2011
Plugin ID:
5295
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    Allows admins to spawn bonus ducks.
    Old 07-27-2016 , 14:10   [TF2] Spawn Bonus Ducks
    Reply With Quote #1


    Spawn Bonus Ducks!
    This plugin allows admins to spawn BONUS DUCKS. A similar plugin (but lazier-made and crappier) was made and released by me when the EotL update hit. After Valve stated they saw using plugins to spawn ducks as "cheating without hacking", I removed the downloads and any info pertaining to spawning ducks.

    Now that the update has been over for a long time, and the ducks no longer give XP, I remade the plugin and am releasing it.


    Commands
    • sm_quack <target> <number of ducks to spawn (1-100)> <are spawned ducks Quackstons? (0/1)> - Spawns the chosen amount of ducks on the target. (ADMFLAG_CHEATS)
    • sm_aimquack <number of ducks to spawn (1-100)> <are spawned ducks Quackstons? (0/1)> - Spawns the chosen amount of ducks at your crosshairs. (ADMFLAG_CHEATS)
    • sm_unquack - Kills all tf_bonus_duck_pickup entities that are active on the map. (ADMFLAG_CHEATS)


    Want to restrict who has access? Simply head over to your server's "admin_overrides.cfg" file and add in the following:
    Code:
    "sm_quack"  "<add flag here>"
    "sm_aimquack"  "<add flag here>"
    "sm_unquack"  "<add flag here>"
    Just replace the "<add flag here>" bit with whatever flag you want to restrict it to, i.e. "z" or "b".

    Note: When spawning ducks, if you enter "0" for the "are ducks quackston hale ducks" argument, the plugin looks at which class you are and which team you're on and spawns the respective skinned duck (i.e. if you're a BLU Pyro, the non-Quackston ducks you spawn will be BLU Pyro ducks).


    Convars
    • sm_spawnbonusducks_version - Standard version convar. Do not touch!



    Installation Instructions
    1. Download tf2_duckspawn.smx and put it into "addons/sourcemod/plugins"
    2. Run the plugin
    3. ???
    4. Profit!


    Want to unleash utter chaos on your server?
    If so, give the "tf2_duckspawnchaos.smx" plugin a try. The difference between the "CHAOS EDITION" and the standard plugin is that the CHAOS EDITION's commands are all publicly accessible, meaning everyone can use the commands and spawn ducks at will.


    Version History
    Version History



    Credits
    • Jessecar - Original source of the code snippet for spawning ducks.
    • Pelipoika - Has really been awesome with helping me learn this newdecls stuff. Thanks Pelipoika!



    Problems? Suggestions?
    There shouldn't be any errors or bugs in this plugin, but if you do happen to find any, please let me know on this thread and I'll try my best to correct the issues! If you have any suggestions for ways to rework my code, or suggestions of new things to add, let me know! Lastly, if you think I should create convars to control other things in this plugin, let me know!
    Attached Files
    File Type: sp Get Plugin or Get Source (tf2_duckspawn.sp - 1450 views - 13.9 KB)
    File Type: sp Get Plugin or Get Source (tf2_duckspawnchaos.sp - 1172 views - 14.0 KB)

    Last edited by 404UserNotFound; 08-01-2019 at 16:51.
    404UserNotFound is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 07-28-2016 , 10:40   Re: [TF2] Spawn Bonus Ducks
    Reply With Quote #2

    When I saw this plugin I imagined it would basically spray ducks out of a player after using the command. Just like when you get hit in that bumper car halloween map mode, but way more ducks and you could set the direction - random/through aim. Sounds way better than just spawning them, IMO.

    sm_aimduck can only be used when alive, why?
    Also, remove FCVAR_PLUGIN from the version cvar. That flag has been deprecated in sourcemod 1.8+.
    __________________

    Last edited by luki1412; 07-28-2016 at 11:11.
    luki1412 is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 07-28-2016 , 21:26   Re: [TF2] Spawn Bonus Ducks
    Reply With Quote #3

    Quote:
    Originally Posted by abrandnewday View Post
    Removed tf2 and sdktools includes as tf2_stocks includes both by default. Kept the sourcemod include in even though it isn't necessary, just because I felt like keeping it.
    I originally toyed with the idea of submitting a pull request on SourceMod itself to move things around between tf2.inc and tf2_stocks.inc and make tf2_stocks.inc stop auto-pulling tf2 in, but didn't because it would break plugins that did this.
    __________________
    Not currently working on SourceMod plugin development.
    Powerlord is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 08-03-2016 , 09:34   Re: [TF2] Spawn Bonus Ducks
    Reply With Quote #4

    sm_aimduck cant be used when dead. thought you fixed it.
    __________________
    luki1412 is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 08-04-2016 , 07:07   Re: [TF2] Spawn Bonus Ducks
    Reply With Quote #5

    Quote:
    Originally Posted by abrandnewday View Post
    So did I. One moment.

    EDIT: Wait, of course it can't. I fixed sm_quack because you should be able to use it while you're dead. sm_quack is for targetting people. sm_aimquack uses your eye angles so using it while dead generally isn't a good idea, could lead to ducks being spawned in walls or in the void. That's also why you can't use sm_aimquack from the console. Console doesn't produce eye angles because it's not an actual client.

    Why would you even want to try using it while you're dead? Or does the dead-check prevent it from working when you're a Spectator?
    Yes, it blocks it from being used while spectating (obviously, youre not alive when youre spectating).
    But you cant really stop admins from going inside walls(no clip) or using it in spectate.

    Besides, you can get to really weird places when youre alive, so this check is just pointless. You can aim at walls as well. Dont understand how is this check actually helping in any way. That's why youre using TR_TraceRayFilter.

    Console check for aimduck is correct.

    The plugin is spawning all ducks in the same spot, just slightly rotated and they start blinking after a couple of seconds but wont disappear. Was that intentional?

    Btw. INVALID_HANDLE was replaced by null in 1.7+
    __________________
    luki1412 is offline
    Potato Uno
    Veteran Member
    Join Date: Jan 2014
    Location: Atlanta, Georgia
    Old 08-04-2016 , 17:40   Re: [TF2] Spawn Bonus Ducks
    Reply With Quote #6

    Quote:
    Originally Posted by luki1412 View Post
    You can still use INVALID_HANDLE in newdecls.

    The only bonus null gives you is you can use it on data types that inherit from Handle (like Array or whatever).
    Potato Uno is offline
    luki1412
    Veteran Member
    Join Date: Oct 2008
    Location: OnPluginStart()
    Old 08-05-2016 , 06:11   Re: [TF2] Spawn Bonus Ducks
    Reply With Quote #7

    Quote:
    Originally Posted by Potato Uno View Post
    You can still use INVALID_HANDLE in newdecls.

    The only bonus null gives you is you can use it on data types that inherit from Handle (like Array or whatever).
    I know you can and it wont even throw an error or a warning when compiling but when you take your time to update your code with newdecls, why not replace INVALID_HANDLE as well?
    __________________
    luki1412 is offline
    Reply



    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 12:04.


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