script edit: weapon pickup on use exchange

heey!! I found a lua file on gmod files that lets your server people pick up weapons on e, the bad thing is, its not toggleable and conflicts with some of the stuff on the server, the other problem is, if there a bunch of guns within 4 feet of you, it picks them all up at once…

would you be able to improve or fix it??
Basicly I want as close as possible to DarkRPS drop weapon on death(or weapons, as in most all or configurable, with dropweapon_on_death 0 being off 1 being on and 2 being all or configured)
along with Darkrps Drop weapon with /drop (close as possible too) and darkrps cant pick up anything inless you press e on it but you cant pick up a pile thing, all with on and off toggles that the client or server (or both, can change)
and on a side note, would it be possible to get shipments of any kind, including custom shipments, as entitys in the q menu??
haha, sounds like im just asking for a light darkrp, i would go further asking for a money system like darkrps, you know for custom stuff like wavemode, but past that it gets insane, and id rather be better off making a super super lightweight darkrp…
http://www.facepunch.com/threads/949564
this is the thread i found with my code, but when i tried weapon_pickup_on_use 1 it gave me unknown command, and even if that fixed it, what about it multi picking up items??
thanks!
i also found this

that one seems to have a thing that prevents it from multi picking up, anyways heres the original code
what i want is the ability for it to not pick up everything around you and only pick up what you point at, just like DARKRP, and i want it to be toggleable with a command…
[lua]hook.Add( “PlayerSpawn”, “PickupTimeout”, function( ply )
ply.PickupTimeout = CurTime() + 0.5
end )

hook.Add( “PlayerCanPickupWeapon”, “NoPickup”, function( ply, wep )
if ( ( ply.PickupTimeout or 0 ) < CurTime() ) then return false end
end )

hook.Add( “KeyPress”, “PressUse”, function( ply, key )
if ( key == IN_USE ) then
local tr = ply:GetEyeTrace()
if ( ValidEntity( tr.Entity ) and tr.Entity:IsWeapon() and tr.Entity:GetPos():Distance( ply:GetShootPos() ) < 96 ) then
ply.PickupTimeout = CurTime() + 0.5

		ply:Give( tr.Entity:GetClass() )
		tr.Entity:Remove()
	end
end

end )
[/lua]

heres his edited version

heres the wikis version
[lua]

hook.Add( “PlayerSpawn”, “PickupTimeout”, function( ply )
ply.PickupTimeout = CurTime() + 0.5
end )
function GM:PlayerCanPickupWeapon( ply, entity )
if ( ply.PickupTimeout or 0 ) > CurTime() then return true end
if ( ply.NextPickup or 0 ) > CurTime() then return false end

if ply:KeyDown( IN_USE ) then
	local tr = ply:GetEyeTrace()
	if ValidEntity( tr.Entity ) and tr.Entity:GetPos():Distance( ply:GetShootPos() ) &lt; 92 and tr.Entity == entity then
		ply.NextPickup = CurTime() + 0.5
		return true
	end
end
return false

end
[/lua]

also is this a good method for dropping a weapon?? its another mod i found, and im pretty sure you can make it a 5 line lua file instead of a 60…
[lua]
function DropCurrentWeapon(ply)
local Currentweapon = ply:GetActiveWeapon()

     local NewWeapon = ents.Create(Currentweapon:GetClass())

     local currentweaponclip1 = Currentweapon:Clip1()
     local currentweaponclip2 = Currentweapon:Clip2()

     ply:StripWeapon(Currentweapon:GetClass())


     NewWeapon:SetPos(ply:GetShootPos() + (ply:GetAimVector() * 30))

     ply.AllowWeaponPickupFix = 0

     timer.Simple(1.5,PickupDelayFunc,ply)

     NewWeapon:Spawn()
     
     NewWeapon:SetClip1(currentweaponclip1)
     NewWeapon:SetClip2(currentweaponclip2)

end

function PickupDelayFunc(ply)
ply.AllowWeaponPickupFix = 1
end

if SERVER then
concommand.Add(“DropWeapon”,DropCurrentWeapon)
end

function AutoBindOnSpawn(ply)
ply.AllowWeaponPickupFix = 1
ply:ConCommand("bind g DropWeapon
")
end

hook.Add(“PlayerInitialSpawn”,“AutobindDropWeapon”,AutoBindOnSpawn)

function RePickupFix(ply,weapon)
if ply.AllowWeaponPickupFix == 0 then return false end
end

hook.Add(“PlayerCanPickupWeapon”,“FixForPickup”,RePickupFix)

[/lua]

i just found this somewhere is it the same thing as above?? whats better??
[lua]
local function DropWeapon(ply,cmd,args)
if !ply:Alive() then return end

local CurWeap = ply:GetActiveWeapon()
 
if IsValid( CurWeap ) then
    ply:DropWeapon( CurWeap )
end

end
concommand.Add( “drop”, DropWeapon )
[/lua]
wow i just realised i sidetracked the topic… oops…
anyways my new goal is to have seperate toggleable scripts that will be just like darkrps if possible, so if i want too i can drop my weapon mabye with /drop like darkrp, and pickup my weapon like darkrp, both with toggles…
i was hoping to have the server version of it create toggles like weapon_pickup 1/0 for the client to use, that way its not forced on by the server