if SERVER then
function SWEP:PrimaryAttack()
if self.Owner:GetEyeTrace().HitPos:Distance(self.Owner:GetPos()) < 100 then
local entity = ents.Create( "gred_emp_grw34" )
if ( !IsValid( entity ) ) then return end
entity:SetPos( self.Owner:GetEyeTrace().HitPos )
local entang = self.Owner:GetAngles()
entity:SetAngles(Angle(0, entang.y, 0) +Angle(0, 180, 0))
entity:SetModel("models/props_artillery/german/r_mortar_gw34.mdl" )
entity:Spawn()
self.Owner:StripWeapon( "turret_entplace" )
end
end
function SWEP:SecondaryAttack() end
end
This is my Code for spawning an entitiy with a Weapon now the problem is the Entity spawns in the floor so i am trying to add some Height to it can anyone help me with that?