View Single Post
Author Message
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 10-24-2010 , 04:56   [TF2] Auto Pumpkins (Automatic Pumpkin Spawner) [v2.2.2]
Reply With Quote #1

[TF2] Auto Pumpkins
Version 2.2.2


Description:
Spawn and save pumpkin locations! They will be restored at the start of each round just like Harvest.

Pumpkin locations are saved per-map, so don't worry about pumpkins on dustbowl showing up in 2fort.

Commands:
sm_spawnpumpkin - Spawns a pumpkin and saves it's location to the database. Pumpkin spawns where you stand.
sm_deletepumpkin - Disables the pumpkin you're looking at in the database.
Cvars:
sm_pumpkin_version - Plugin Version
sm_pumpkin_respawntime "20" - How fast pumpkins respawn. -1 = pumpkins only respawn at round start.

Install Instructions:
  1. Place AutoPumpkins.smx into your addons/sourcemod/plugins/ folder.
  2. Update your database.cfg file:
    Code:
    "autopumpkins"
    {
        "driver" "mysql"
        "host" "webserver IP"
        "database" "database name"
        "user" "database username"
        "pass" "database username password"
        //"timeout" "0"
        "port" "3306"
    }


Notes:
Command's access level is ROOT.
Have your servers share a database to sync pumpkins across multiple servers.

When first spawning a pumpkin, it will be non-solid to prevent you getting stuck. When they are spawned at the start of the round they will be solid as normal.

Plugin requires SDKHooks and as such will not compile on the forums!
Use the pre-compiled .smx or compile it yourself locally!

Version History:
  • V1.0.0
    • Initial Release
  • V1.1.1
    • Plugin now escapes map filenames before inserting them into the database.
    • Pumpkins now spawn with a random rotation so they don't always point "north".
  • V2.0.0
    • Minor code cleanup
    • Plugin now uses a threaded SQL connection
    • Pumpkins now respawn after they explode (cvar sm_pumpkin_respawntime)
    • Plugin now requires SDKHooks!
  • V2.0.1
    • Fixed a typo in a log message.
  • V2.0.2
    • sm_pumpkin_respawntime -1 now works as intended.
  • V2.2.2
    • A little more code cleanup
    • Updated a sql query left from before v2.0 that was not threaded to be threaded (Plugin is now fully threaded).

Total downloads prior to 2/7/2012 : 587
Attached Files
File Type: sp Get Plugin or Get Source (AutoPumpkins.sp - 830 views - 7.6 KB)
File Type: smx AutoPumpkins.smx (7.2 KB, 999 views)
__________________

Last edited by DarthNinja; 02-10-2012 at 23:56.
DarthNinja is offline