Entity Factory and Base Entity multiplayer errors

This only happens in multi player, single player is fine.

So a SWEP spawns an entity(bullet) and it gives me this error;

Can’t find factory for entity: gdcwa_5.56x45_tracer

It works fine in single player so don’t assume the entity isn’t spawning at all. Here’s the code used to spawn it

local aim = self.Owner:GetAimVector()
local side = aim:Cross(Vector(0,0,1))
local up = side:Cross(aim)
local pos = self.Owner:GetShootPos() +  aim * 30 + side * 3 + up * -1	--offsets the rocket so it spawns from the muzzle (hopefully)
local rocket = ents.Create("gdcwa_5.56x45_tracer")
	if !rocket:IsValid() then return false end
	rocket:SetAngles(aim:Angle()+Angle(90,0,0))
	rocket:SetPos(pos)
rocket:SetOwner(self.Owner)
rocket:Spawn()
rocket:Activate()

And when it is done it Fretta it gives this error;

ERROR: Trying to derive entity gdcwa_5.56x45_tracer from non existant entity base_gmodentity!

Remember the bullet still spawns and flies and kills. I just need to know how to get rid of the error. Thanks!

base_gmodentity is a sandbox entity, fretta’s not derived from sandbox, use base_anim or something instead.
These are the entities you could use:
http://luabin.foszor.com/code/gamemodes/base/entities/entities

It sounds like this weapon is trying to create this entity on the client, which isn’t supposed to happen. I’m assuming that the firing function is shared. In singleplayer, a weapon’s firing functions are not called on the client, which explains why you only encounter the error in multiplayer. Make sure only the server is creating that entity in your code.