• Fall Damage
    3 replies, posted
I've been trying to make the player have no fall damage while holding a specific weapon, I have tried every kind of tutorial and wiki info I've found around the internet, none of them seem to work anymore.. [highlight](User was banned for this post ("undescriptive thread title" - Gran PC))[/highlight]
[CODE] function GM:GetFallDamage( ply ) if ply:GetActiveWeapon() == "weapon" then return 0 else return 10 end end [/CODE] You can add this to the shared.lua and it should work.
[QUOTE=goosey;40767356][CODE] function GM:GetFallDamage( ply ) if ply:GetActiveWeapon() == "weapon" then return 0 else return 10 end end [/CODE] You can add this to the init.lua and it should work.[/QUOTE] Thanks I'll try that [editline]24th May 2013[/editline] I'm adding that to the weapon's folder cl_init.lua
Put this in a shared file. shared.lua, e.g. [lua] function GAMEMODE:GetFallDamage() if ply:GetActiveWeapon():GetClass() == "weapon_pistol" then return 0 end end [/lua] Don't return something if you're not modifying it.
Sorry, you need to Log In to post a reply to this thread.