Raised This Month: $ Target: $400
 0% 

[Any] Set players health (with Spawn Health)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
joac1144
Senior Member
Join Date: Dec 2012
Location: Copenhagen, Denmark
Plugin ID:
4058
Plugin Version:
2.0
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Simple set health plugin
    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 - 2648 views - 3.7 KB)
    __________________

    Last edited by joac1144; 09-11-2018 at 08:04. Reason: Update.
    joac1144 is offline
    TF2CutContentWiki
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Old 01-31-2014 , 18:02   Re: [Any?] Set players health
    Reply With Quote #2

    We already have a Set Health plugin.

    That plugin supports a number of games, whereas this one is incredibly small in size and probably only works for one game.

    It's good work for a second plugin though, I'll give ya that.
    __________________
    TF2CutContentWiki is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Location: mom's basement
    Old 01-31-2014 , 18:10   Re: [Any?] Set players health
    Reply With Quote #3

    You haven't load translation which ReplyToTargetError and translated target name require...
    Bacardi is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 01-31-2014 , 19:10   Re: [Any?] Set players health
    Reply With Quote #4

    Quote:
    Originally Posted by Bacardi View Post
    You haven't load translation which ReplyToTargetError and translated target name require...
    Thank you, I forgot that.
    Plugin updated.
    __________________
    joac1144 is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 01-31-2014 , 19:12   Re: [Any?] Set players health
    Reply With Quote #5

    Quote:
    Originally Posted by abrandnewday View Post
    We already have a Set Health plugin.

    That plugin supports a number of games, whereas this one is incredibly small in size and probably only works for one game.

    It's good work for a second plugin though, I'll give ya that.
    I haven't tested this in other games than CS:S, but I think it should work in all Source 2009 games.
    __________________

    Last edited by joac1144; 01-31-2014 at 19:12.
    joac1144 is offline
    hannes96
    AlliedModders Donor
    Join Date: May 2013
    Location: Germany
    Old 01-31-2014 , 21:15   Re: [Any?] Set players health
    Reply With Quote #6

    Good Job! The plugin works fine for TF2. It's even better than the other one because I can set the hp lower than normal (for example I can't set the Heavys health under 300 with the other plugin). But if you set the hp to 0 or anything lower with this plugin you are invincible.

    Last edited by hannes96; 01-31-2014 at 21:20.
    hannes96 is offline
    Maxximou5
    AlliedModders Donor
    Join Date: Feb 2013
    Old 01-31-2014 , 22:18   Re: [Any?] Set players health
    Reply With Quote #7

    Works for CS:GO using values of -999 - -1 > 0 < 1-999, using a value of 0 stops the player from any movement or hud display. A great small nifty plugin nonetheless.
    __________________
    Maxximou5 is offline
    TF2CutContentWiki
    ( ͡ ͜ʖ ͡)
    Join Date: Dec 2011
    Old 02-01-2014 , 01:16   Re: [Any?] Set players health
    Reply With Quote #8

    Quote:
    Originally Posted by hannes96 View Post
    But if you set the hp to 0 or anything lower with this plugin you are invincible.
    Uh...that's what God Mode plugins are for
    __________________
    TF2CutContentWiki is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 02-01-2014 , 06:44   Re: [Any?] Set players health
    Reply With Quote #9

    Quote:
    Originally Posted by hannes96 View Post
    Good Job! The plugin works fine for TF2. It's even better than the other one because I can set the hp lower than normal (for example I can't set the Heavys health under 300 with the other plugin). But if you set the hp to 0 or anything lower with this plugin you are invincible.
    I just tested this in my CS:S server and when I give myself 0 HP, I can still die.
    I don't think I can fix this in TF2 since I'm noob to Sourcemod scripting and doesn't have a TF2 server
    __________________

    Last edited by joac1144; 02-01-2014 at 06:44.
    joac1144 is offline
    joac1144
    Senior Member
    Join Date: Dec 2012
    Location: Copenhagen, Denmark
    Old 02-01-2014 , 15:40   Re: [Any?] Set players health
    Reply With Quote #10

    Quote:
    Originally Posted by Maxximou5 View Post
    Works for CS:GO using values of -999 - -1 > 0 < 1-999, using a value of 0 stops the player from any movement or hud display. A great small nifty plugin nonetheless.
    I can't seem to find a fix for this, but thanks for testing it.
    __________________
    joac1144 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 17:01.


    Powered by vBulletin®
    Copyright ©2000 - 2022, vBulletin Solutions, Inc.
    Theme made by Freecode