Thread: Set Health
View Single Post
Author Message
MrBlip
Junior Member
Join Date: Jul 2008
Old 07-10-2008 , 00:38   Set Health
Reply With Quote #1

SetHealth by Mr. Blip
  • Sets a player, an entire team, or everyone's health to the specified amount.
about:
I looked and looked and couldn't find a plugin that sets a players health to a specified amount in a manner that I wanted it to. The closest thing I could find was one that was buried in the 'Super Admin' plugin, but it seemed messy and didn't work as I wanted it to (for example, @T and @CT actually targeted all). So, with the help of bl4nk, I set forth on a journey on how to create my own plugins and this is what I came up with.

Cvars:
  • sm_sethealth_version = 1.0
Usage:
  • sm_sethealth <#userid|name> <amount>
  • EX: sm_sethealth @all 500
To-Do:
  • Logging (forgot all about it until just now)
  • Checking for negative numbers (not sure what effect this will have on the plugin)
  • Possibly include a 'silent' command? (for those sneaky admins)
The plugin definitely works for CS:S, so for right now that's the game. If anyone can confirm that it works for DoD:S or TF2 that'd be great.

Change Log:

Version 1.2.2
  • Fixed health on engineer not working
Version 1.2.1
  • Setting health in TF2 should now work as intended
  • Setting health to 0 in TF2 will cause the players to explode, all other mods SHOULD reset health to 1
Version 1.2
  • Added better support for TF2
Version 1.1
  • Added logging
  • Only allows numbers greater then 0
  • Removed 's from the phrases file.
Version 1.0
  • Initial Release
Again, many thanks to bl4nk for pointing me in the right direction.
Attached Files
File Type: txt sethealth.phrases.txt (101 Bytes, 9588 views)
File Type: sp Get Plugin or Get Source (sm_sethealth.sp - 20396 views - 2.4 KB)

Last edited by MrBlip; 07-23-2008 at 14:49.
MrBlip is offline