From Garry's Mod
Called when a player makes contact with the ground.
|NOTE||This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.|
Did the player land in water?
Did the player land on an object floating in the water?
The speed at which the player hit the ground
Return true to suppress default action
Explode players when they hit the ground too hard.
function GM:OnPlayerHitGround( ply, inWater, onFloater, speed ) if speed > 1000 && !inWater then local exp = ents.Create("env_explosion") exp:SetPos(ply:GetPos()) exp:Spawn() exp:SetKeyValue("iMagnitude", "0") exp:Fire("Explode", 0, 0) ply:Kill() end end