enzopaul4 Posted February 8, 2017 Posted February 8, 2017 Hello guys , how can i make a script to set hp to a player ? Thx for help
Yazir Posted February 8, 2017 Posted February 8, 2017 (edited) function sethp(player, cmd, arg1, arg2 ) if getPlayerFromName( arg1 ) and type(tonumber(arg2)) == "number" then setElementHealth( getPlayerFromName(arg1), tonumber(arg2)) end end addCommandHandler( "sethp", function sethp) Not tested though. Edited February 8, 2017 by Yazir
ViRuZGamiing Posted February 8, 2017 Posted February 8, 2017 7 hours ago, Yazir said: function sethp(player, cmd, arg1, arg2 ) if getPlayerFromName( arg1 ) and type(tonumber(arg2)) == "number" then setElementHealth( getPlayerFromName(arg1), tonumber(arg2)) end end addCommandHandler( "sethp", function sethp) Not tested though. function on line 6 will give error: addCommandHandler( "sethp", sethp) 1 "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now