View Single Post
Author Message
dataviruset
AlliedModders Donor
Join Date: Feb 2009
Location: Hong Kong
Old 02-08-2010 , 17:46   [ANY] SM_CheckpointSaver (v1.06)
Reply With Quote #1

SM_CheckpointSaver

Description:
Well, here I am again, porting EventScripts to SourceMod. This time I had this checkpoint saver for EventScripts. Well, I also wanted to throw EventScripts away and gather all my plugins in SourceMod instead. Much lighter, much more optimized.

This checkpoint saver is great for your bhop/jump/climbing/etc servers, it allows any player to save a position and then teleport back to it. Useful for naughty bhop maps which takes you back to the very beginning when you fail (fall ). You could use the !cpsave and !cptele commands (also from console - sm_cpsave & sm_cptele) or the menu !cpmenu. The plugin also bundles a noblock- and no fall damage function.

Requirements:
SourceMod 1.7.0+

Features:
  • Position saving (+ on ground-checking)
  • Teleporting back
  • NoBlock bundle
  • No fall damage bundle
  • Full translation support
  • Some funky sounds
  • Possibility to reset the checkpoints when a player dies or changes team

Chat commands:
  • !cpsave -- save current position as a teleporting target
  • !cptele -- teleport back to saved position
  • !cpmenu -- open up a fixed menu with the above commands

ConVars (automatically created in cfg/sourcemod/sm_cpsaver.cfg):


Code:
// Enable/disable blocking of fall damage (resets hp to sm_cpsaver_standard_hp after a player gets hurt from falling unless the fall damage is enough to kill him): 0 - disable, 1 - enable
// -
// Default: "1"
sm_cpsaver_block_falldamage "1"

// Enable or disable the plugin: 0 - disable, 1 - enable
// -
// Default: "1"
sm_cpsaver_enable "1"

// Enable/disable player vs player collision blocking: 0 - disable, 1 - enable
// -
// Default: "1"
sm_cpsaver_noblock_enable "1"

// When to reset checkpoints for a player: 0 - disable, 1 - on teamchange, 2 - on player death
// -
// Default: "0"
sm_cpsaver_reset_checkpts "0"

// Standard hp given to players on spawn: x - hp value
// -
// Default: "100"
sm_cpsaver_standard_hp "100"

// SM_CheckpointSaver plugin version (unchangeable)
// -
// Default: "1.06"
sm_cpsaver_version "1.06"

// Whether or not to display help regarding cpsaver when players spawn: 0 - don't display, 1 - display
// -
// Default: "1"
sm_cpsaver_display_help "1"



Installation and requirements:

  • Express install:
In order to do an express install, simply extract the sm-checkpointsaver-x.xx.zip archive into your cstrike directory.

Afterwards, edit the convars in cfg/sourcemod/sm_cpsaver.cfg to your satisfaction.

Restart your server - done.
Upgrading:
Simply unpack the new ZIP archive to do an express upgrade. Update the translation files, make sure you have the updated convars from the sm_cpsaver.cfg file, and restart your server.

Changelog:

  • 1.00
    • Initial release
  • 1.01
    • Minor optimization fixes (link)
  • 1.02
    • Fixed the sm_cpsaver_enable convar to actually do the things it should do
  • 1.03
    • Added sm_cpsaver_reset_checkpts convar to make it possible to reset the checkpoints when a player dies or changes team
  • 1.04
    • Added sm_cpsaver_display_help to decide whether the help menu should pop-up on player spawns or not
    • Some tidying in the code
  • 1.05
    • Fixed the sm_cpsaver_enable convar to also disable/enable the !cpmenu command as it should
  • 1.06
    • Added native CheckpointSaver_ClearCheckpoints that can be called from another plugin to clear the saved checkpoints for a player

Translations:
If you want to share your translation of SM_CheckpointSaver, please submit your translation in this thread. I'll check it out and pack it into the ZIP archives if it looks good enough
A big THANK YOU to the SourceMod development team for making this great stuff. You rock.
Attached Files
File Type: zip sm-checkpointsaver-1.06.zip (15.2 KB, 2486 views)

Last edited by dataviruset; 05-10-2015 at 14:43. Reason: v1.06
dataviruset is offline