Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add( "PlayerSpawn", "Spawned Weapons", function( ply )
- ply.PickupDelay = CurTime() + 0.8
- ply.Start = CurTime() + 0.5
- end )
- function GM:PlayerCanPickupWeapon( ply, entity )
- if ply.Start > CurTime() then return true end
- if ply.PickupDelay > CurTime() then return false end
- if ply:KeyDown( IN_USE ) then
- local tr = ply:GetEyeTrace()
- if ValidEntity( tr.Entity ) and tr.Entity == entity and tr.Entity:GetPos():Distance( ply:GetShootPos() ) < 80 then
- ply.PickupDelay = CurTime() + 0.8
- return true
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement