Swep/Entity question

Just one question this time guys,

How would I make a swep spawn an entity in midair in the way your are facing but always at the same height above the ground so it doesn’t use the up down of the weapon to any use?

Something like

[lua]
local dir = pl:GetAimVector();
dir.z = 0;
local pos = pl:GetPos() + ( dir * 200 );
[/lua]

How would i get an entity to spawn in that direction a few feet in front?

[editline]06:41PM[/editline]

Nevermind

[editline]07:17PM[/editline]

Little error:

[lua] local dir = pl:GetAimVector();[/lua]
what should pl be? i tried ply but that didn’t work…

LocalPlayer()

or…

self.Owner