View Single Post
Author Message
joac1144
Senior Member
Join Date: Dec 2012
Location: Copenhagen, Denmark
Old 01-23-2014 , 04:44   [Any] Set players health (with Spawn Health)
Reply With Quote #1

Description
One of my friends needed a plugin to set players' health, but he only wanted the health command, not all the others from SM Super Commands.
So I wrote this plugin to him and decided to publish it here if anyone wants this too.


CVAR list:
No ConVars.


Command list:
sm_hp <name or #userid> <HP> - Sets a player's health
sm_spawnhp <name or #userid> <HP> - Sets an amount of health to a player on spawn.
Examples:
sm_hp player1 200
sm_hp @all 500
sm_spawnhp player1 200
sm_spawnhp @all 500

Admin Flag SLAY/F is required to use the commands.


Changelog:
Quote:
1-23-2014 (v1.0)

*Plugin released

2-1-2014 (v1.1)

*Now loads the common.phrases translations file

2-8-2014 (v1.2)

*You can't set health to 0 or below

5-6-2014(v1.3)

*Added sm_spawnhp to set players health on spawn

10-06-2015 (v1.3.5)

*Updated code

12-11-2017 (v2.0)

*Updated to new syntax
*Fixed the spawnhp command
Installation:
Download sethealth.smx and put it into addons/sourcemod/plugins folder.


Bugs:
CS:GO:
Setting the health to 0 stops the player from any movement or hud display.
TF2:
Setting the health to 0 or below will give the player god mode.
I have currently fixed this by making it impossible to use a value of 0 or below.


-This is my second plugin ever-
Attached Files
File Type: sp Get Plugin or Get Source (sethealth.sp - 3039 views - 3.7 KB)
__________________

Last edited by joac1144; 09-11-2018 at 08:04. Reason: Update.
joac1144 is offline