Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if !timer.Exists( "earthquake" ) then
- timer.Create( "earthquake", 0.5, 500, function()
- for _, p in pairs(player.GetAll()) do
- p:SetPos( p:GetPos() + Vector( 0, 0, 1 ) )
- p:SetVelocity( Vector( math.random( -50, 50 ), math.random( -50, 50 ), math.random( 100, 150 ) ) )
- util.ScreenShake( p:GetPos(), 20, 1, 1, 100 )
- p:EmitSound( "ambient/explosions/exp1.wav", 100, math.random( 60, 100 ) )
- end
- for _, e in pairs(ents.GetAll()) do
- if e:GetPhysicsObject() and e:GetPhysicsObject():IsValid() then e:GetPhysicsObject():AddVelocity( Vector( math.random( -50, 50 ), math.random( -50, 50 ), math.random( 100, 150 ) ) ) end
- end
- end)
- else
- timer.Remove( "earthquake" )
- end
Advertisement
Add Comment
Please, Sign In to add comment