I would love is someone made some CSS and HL2 sweps/sents that do not auto pickup when walked over. Instead the player would press E to equip the weapon.
[code]
// RabidToaster is SO frickin cool
// What the hell is this doing clientside?
if ( CLIENT ) then return end
local function PlayerCanPickupWeapon( ply, weap )
if ( CurTime() <= ( ply.UseWeaponSpawn or 0 ) ) then return end
if ( !ply:KeyDown( IN_USE ) ) then return false end
local trace = util.QuickTrace( ply:GetShootPos(), ply:GetAimVector() * 8192, ply )
if ( !trace.Entity || !trace.Entity:IsValid() || trace.Entity != weap ) then
return false
end
end
hook.Add( "PlayerCanPickupWeapon", "UseWeapon", PlayerCanPickupWeapon )
local function PlayerSpawn( ply )
ply.UseWeaponSpawn = CurTime()
end
hook.Add( "PlayerSpawn", "UseWeapon", PlayerSpawn )
[/code]
Straight from rabidtoaster.com ( [url]http://rabidtoaster.com/scripts/Server%20Side/Scripts/useWeapon.lua[/url] )
-snip-
Sorry, you need to Log In to post a reply to this thread.