Raised This Month: $119 Target: $400
 29% 

[TF2] Auto Kits


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Plugin ID:
4438
Plugin Version:
0.1.0
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    19 
    Plugin Description:
    Spawn and Save Medkits & Ammo packs
    Old 12-05-2014 , 14:02   [TF2] Auto Kits
    Reply With Quote #1

    Auto Kitsfor TF2

    Description
    Place and save medkits and ammo in the map. When you spawn them, they are saved in a database.
    This is based in the DarthNinja's Auto Pumpkins. This plugin is pretty basic, but it's awesome for some Orange maps that don't have any health or ammo in it.
    To spawn a kit you need to be an admin with the root flag and type !akmenu. You can also delete the nearest kit (but you have to be close to it to delete).

    Features
    • You can place small, medium and full medkits and ammokits.
    • Kits re-spawn after 10 seconds and emit the spawn sound, like normal kits.
    • The medkits don't spawn on sudden death.
    Changelog
    Quote:
    2014-12-05 (v0.1.0)
    * Initial release.
    Installation instructions
    Just place the auto_kit.smx in your sourcemod/plugins/ folder.
    This plugin doesn't have any cvar but you need to setup your database.
    The config name must be "autokits" and your database "TF2_AutoKits", here is my server's config:
    Code:
    "autokits"
    {
    	"driver"			"sqlite"
    	"host"				"localhost"
    	"database"			"TF2_AutoKits"
    	"user"				"root"
    	"pass"				""
    }
    Credit
    DarthNinja for his Auto Pumpkins plugin.

    Note: I'm not that good with SQL and my plugin uses really simple queries. Feel free to post any suggestion to improve it!
    Attached Files
    File Type: sp Get Plugin or Get Source (auto_kit.sp - 1187 views - 15.3 KB)

    Last edited by ClassicGuzzi; 12-05-2014 at 14:10.
    ClassicGuzzi is offline
    ocwoody
    AlliedModders Donor
    Join Date: Nov 2010
    Location: huh
    Old 12-05-2014 , 17:05   Re: [TF2] Auto Kits
    Reply With Quote #2

    Great plugin!

    Will definitely test this on my orange server!
    __________________

    ocwoody is offline
    Michalplyoutube
    Veteran Member
    Join Date: Jan 2013
    Location: Tank Carrier in Mannhatt
    Old 12-05-2014 , 17:56   Re: [TF2] Auto Kits
    Reply With Quote #3

    Well nice plugin but you should use the materialize netprop thing to make itself regenerate on pickup
    __________________
    The plugin developer of TF2BWR Reborn
    And a TF2 Player
    Michalplyoutube is offline
    ClassicGuzzi
    Veteran Member
    Join Date: Oct 2013
    Location: Argentina
    Old 12-05-2014 , 19:18   Re: [TF2] Auto Kits
    Reply With Quote #4

    Quote:
    Originally Posted by Michalplyoutube View Post
    Well nice plugin but you should use the materialize netprop thing to make itself regenerate on pickup
    I'm not aware of this method could you give me more info about it?

    Last edited by ClassicGuzzi; 12-05-2014 at 19:55.
    ClassicGuzzi is offline
    NiagaraDryGuy
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Location: 🍁
    Old 12-06-2014 , 03:31   Re: [TF2] Auto Kits
    Reply With Quote #5

    With this, I may be able to re-code the Annotations plugin to use a database to store locations of placed annotations
    __________________
    Creator of the AlliedModders Discord
    NiagaraDryGuy is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 12-06-2014 , 08:17   Re: [TF2] Auto Kits
    Reply With Quote #6

    You could just edit the map with entspy on the server to add the entities yourself, or use stripper source.
    Either is a better solution for one time map fixes.
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    ClassicGuzzi
    Veteran Member
    Join Date: Oct 2013
    Location: Argentina
    Old 12-06-2014 , 13:29   Re: [TF2] Auto Kits
    Reply With Quote #7

    Quote:
    Originally Posted by abrandnewday View Post
    With this, I may be able to re-code the Annotations plugin to use a database to store locations of placed annotations
    One of my objectives was to learn about SQL in sourcemod, that's why it's most of the SQL-related part is commented (I got part of the code from another post about SQL examples, I don't remember which right now). Also I would love to get a database-based annotations plugin!

    Quote:
    Originally Posted by friagram View Post
    You could just edit the map with entspy on the server to add the entities yourself, or use stripper source.
    Either is a better solution for one time map fixes.
    I wasn't going to post this as a new plugin at first, because it was just a quick fix for some maps. I didn't know about entspy (and for what you are saying people would have to download the map again?), and I have never used stripper source (I want to learn how to use it in order to play FF2 in normal maps).

    This is heavily based on the auto pumpkin plugin so it wasn't that hard, and my main objective was to learn about queries in sm. After I got this code working exactly as I wanted, I was going to post it as a snippet, but it ended as a new plugin because I really wanted feedback and help to improve it.

    This plugin is easy to install, you just need the plugin and the database cfg, and to spawn&save a kit it's a matter of one button in a menu. It can't get simpler than that, you say that you have two solution that are better than this, but that's relative. This a simple solution that don't requires any extension or map re-download.

    Last edited by ClassicGuzzi; 12-06-2014 at 13:31.
    ClassicGuzzi is offline
    Stylee32
    AlliedModders Donor
    Join Date: Nov 2014
    Old 02-12-2015 , 16:46   Re: [TF2] Auto Kits
    Reply With Quote #8

    Thanks for this useful plugin!
    Stylee32 is offline
    eraserhead
    Veteran Member
    Join Date: Nov 2009
    Old 06-20-2015 , 15:16   Re: [TF2] Auto Kits
    Reply With Quote #9

    Thank you, finally some ammopacks in the middle of Turbine. No more running up the stairs. Although this was also possible with the stripper mod but this is easier.
    __________________
    eraserhead is offline
    Send a message via Skype™ to eraserhead
    Burninghot
    Junior Member
    Join Date: Sep 2015
    Old 09-06-2015 , 17:24   Re: [TF2] Auto Kits
    Reply With Quote #10

    Hey. So I've tried installing this on my server, however I get this error:

    ] rcon sm plugins refresh
    L 09/06/2015 - 22:18:48: [auto_kit.smx] Database failure: Could not find database conf "autokits"
    L 09/06/2015 - 22:18:48: [SM] Plugin encountered error 25: Call was aborted
    L 09/06/2015 - 22:18:48: [SM] Native "SetFailState" reported: Couldn't connect to the database, check logs for more information.
    L 09/06/2015 - 22:18:48: [SM] Displaying call stack trace for plugin "auto_kit.smx":
    L 09/06/2015 - 22:18:48: [SM] [0] Line 89, /home/forums/content/files/2/3/8/8/6/4/140486.attach::SQL_OnConnect()
    [SM] The plugin list has been refreshed and reloaded.
    >

    Any ideas? I've placed the plugin into the plugin folder and the other two files were made and placed in the cfg folder.

    Thank you.
    Burninghot 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 22:27.


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