AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] SM_CheckpointSaver (v1.06) (https://forums.alliedmods.net/showthread.php?t=118215)

dataviruset 02-08-2010 17:46

[ANY] SM_CheckpointSaver (v1.06)
 
1 Attachment(s)
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 :roll:). 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.

Xp3r7 02-08-2010 20:46

Re: [ANY] SM_CheckpointSaver
 
Very nice!

I can see this being useful on many servers!

LordVader! 02-08-2010 23:03

Re: [ANY] SM_CheckpointSaver
 
Great! :) been looking for something like this for my surf servers.

And admin flag that can be set to allow access to only some users?

bobbobagan 02-08-2010 23:20

Re: [ANY] SM_CheckpointSaver
 
Did you make the eventscripts version?

dataviruset 02-09-2010 02:40

Re: [ANY] SM_CheckpointSaver
 
Quote:

Originally Posted by LordVader! (Post 1083350)
Great! :) been looking for something like this for my surf servers.

And admin flag that can be set to allow access to only some users?

No, not at the moment, but that was a good idea. It's added quite simple, actually :wink:

Quote:

Originally Posted by bobbobagan (Post 1083359)
Did you make the eventscripts version?

Nope, that was some guy named haloshadow :)

psychonic 02-09-2010 10:46

Re: [ANY] SM_CheckpointSaver
 
There are multiple existing teleport plugins already, but this one does seem to be a superset of a couple of them (translations, menu support, fixing blocking, etc.). Nice job.

Did you forget to add something in the empty blocks you left? or are they going to be removed? (the empty OnMapStart and default case on the MenuHandler)

dataviruset 02-09-2010 13:23

Re: [ANY] SM_CheckpointSaver
 
Well, the only one I found which lets normal players teleport themselves is this (for TF2, it says)... ;)
Here's some plugin for an admin to bring a player to him or to teleport to a player (goto/bring), and here's some plugin for an admin to save a location and then teleport players to it...

OnMapStart is there because of this, but I honestly don't know if I really needed to have it there, haha... It gets me confused... Well.
The default case on the MenuHandler got there because I thought the plugin didn't compile when it wasn't there. When I removed it now, it compiled anyway. Duuuuuh... Well, it's the truth ;)

psychonic 02-09-2010 19:01

Re: [ANY] SM_CheckpointSaver
 
Quote:

Originally Posted by dataviruset (Post 1083780)
Well, the only one I found which lets normal players teleport themselves is this (for TF2, it says)... ;)
Here's some plugin for an admin to bring a player to him or to teleport to a player (goto/bring), and here's some plugin for an admin to save a location and then teleport players to it...

No, I was complementing it since there are at least two I found with similar base functionality but less features. :wink:

Quote:

Originally Posted by dataviruset (Post 1083780)
OnMapStart is there because of this

Ah, I can see how that could lead to confusion.

What the wiki article means is that if you chose to implement those callbacks that you can rely on a map end occurring for every time a map start occurs. There will never be two map starts before a map end or two map ends after only one map start.

dataviruset 02-10-2010 03:03

Re: [ANY] SM_CheckpointSaver
 
Ah, thanks for explaining.
I thought the OnMapEnd() would never get called if I didn't mention OnMapStart() in the code.

boelie 02-10-2010 05:13

Re: [ANY] SM_CheckpointSaver
 
hehe works on l4d2 gives a fun side effect aswell when your smoked or pounced just teleport away and your freeeeeee
i have a question is it just me or when i have sm_cpsaver_block_falldamage "1"
nothing does damage to me? (l4d2 ofcorse) if i dissable it it works like normal


All times are GMT -4. The time now is 08:05.

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