Garry's Mod Wiki


boolean GM:OnPlayerHitGround( Entity player, boolean inWater, boolean onFloater, number speed )
This hook is predicted. This means that in singleplayer, it will not be called in the Client realm.


Called when a player makes contact with the ground after a jump or a fall.


1 Entity player
2 boolean inWater
Did the player land in water?
3 boolean onFloater
Did the player land on an object floating in the water?
4 number speed
The speed at which the player hit the ground


1 boolean
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

Page Links

Special Pages



Render Time: 49ms

DB GetPage 3
Generate Html 14
SaveChanges (1) 18
Render Body 0
Render Sidebar 12