• Damage player
    6 replies, posted
Hello there. Just wondering how I can drain health from another player. I couldn't find any information on how to do so. Derp niels22
Wrong Section. Don't sign your posts either.
What section then mr. derp.
Lua questions.
[lua] function _R.Player.Damage(ply, int) if int > ply:Health() or int == ply:Health() then ply:Kill() else ply:SetHealth(ply:Health() - int) end end [/lua] FUNCTION: Player:Damage(int), damages a player with ("int") as the amount of damage to inflict. ALTERNATIVE: [url]http://dreamboxstudios.co.uk/forums/index.php?topic=102[/url]
[url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8b03.html?title=Entity.TakeDamage[/url]
Or even [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexba9a.html?title=Entity.TakeDamageInfo[/url]
Sorry, you need to Log In to post a reply to this thread.