what wrong with this npc shop?

CL_INIT

include('shared.lua') 

INIT

AddCSLuaFile( "cl_init.lua" ) 
AddCSLuaFile( "shared.lua" )
include('shared.lua') 


function ENT:Initialize( )
	self:SetModel( "models/humans/group01/female_01.mdl" ) 
	self:SetHullType( HULL_HUMAN ) 
	self:SetHullSizeNormal( )
	self:SetNPCState( NPC_STATE_SCRIPT )
	self:SetSolid(  SOLID_BBOX ) 
	self:CapabilitiesAdd( CAP_ANIMATEDFACE | CAP_TURN_HEAD )
	self:SetUseType( SIMPLE_USE ) 
	self:DropToFloor()
	self:SetMaxYawSpeed( 90 ) 
end

function ENT:OnTakeDamage()
	return false
end 


function ENT:Use( activator, caller )
	if ( activator:IsPlayer() ) then
		activator:ConCommand( "w_2_sp
" ) 
	end
end


SHARED

ENT.Base = "base_ai" 
ENT.Type = "ai" 
ENT.PrintName = "Gustavo's Shop"
ENT.Author = "Gustavgr"
ENT.AutomaticFrameAdvance = true 
ENT.Spawnable = true
ENT.AdminSpawnable = true
ENT.Category 		= "Gustavgr"
function ENT:SetAutomaticFrameAdvance( bUsingAnim ) 
	self.AutomaticFrameAdvance = bUsingAnim
end

No errors, just wont appear when i spawn it.

post the spawn code.

its not a spawn code, im trying to spawn it from the q menu, or do i have to spawn it in a lua code?

I don’t think you can spawn it straight from the Q menu.

idk though, never tried.

You can always spawn it via lua:

init.lua

[lua]
function NPCSpawn()
local ent = ents.Create("<your entity>")
ent:Spawn()
ent:SetPos(x,y,z)
end
[/lua]

should be as simple as that :smiley:

[lua]
function ENT:SpawnFunction( ply, tr )

if not tr.Hit then return end

local ent = ents.Create( "ENTNAME REPLACE TIS" )
ent:SetPos( tr.HitPos + tr.HitNormal * 24 )
ent:Spawn()
ent:Activate()
ent:SetUseType(SIMPLE_USE)

return ent

end
[/lua]

thank you guys, im gonna try it.