Hello, I am trying to make a module to DarkRP that spawns a weapon somewhere on the map. I can spawn the weapons, but they are not like the ones you buy in the f4menu, they get picked up as soon as you walk on them. This is the current code I am using:
local function dropWeapon(player,weapon) local pos = ply:GetEyeTraceNoCursor(); entity = ents.Create("weapon_deagle2") entity:SetPos(ent:SetPos(pos.HitPos + pos.HitNormal * 32);) entity:Spawn() end
What I need is to be able to spawn weapons like you would take a weapon out of the DarkRP pocket.