General > Developers Corner
GMod lua function to set HP?
Deathtitan77:
I am wondering if there is a Gmod lua function to set the HP of a player; currently maurits.tv is down, so if you could help. Please do so.
nathan736:
yes
Entity:SetHealth( number newHealth )
http://wiki.garrysmod.com/page/Entity/SetHealth
wiki.jpg
Deathtitan77:
Entity:SetHealth( number newHealth )
Where do I insert the number, or what do I do exactly?
MrPresident:
inside the parenthesis.
ent:SetHealth(100)
^^ for example ^^
Deathtitan77:
--- Quote from: Deathtitan77 on May 01, 2013, 09:20:53 AM ---I am wondering if there is a Gmod lua function to set the HP of a player; currently maurits.tv is down, so if you could help. Please do so.
--- End quote ---
Anyways, I found out it was:
ply:SetHealth( 100)
Thanks anyway.
Navigation
[0] Message Index
[#] Next page
Go to full version