• ent.SetPos doesn't work
    4 replies, posted
here's the code function ENT:Initialize() self:SetModel( "models/Humans/Group01/Male_03.mdl" ) self:SetHullType( HULL_HUMAN ); self:SetHullSizeNormal(); self:SetPos( 3970, 2829, -12199 ) self:SetSolid( SOLID_BBOX ) self:SetMoveType( MOVETYPE_STEP ) self:CapabilitiesAdd( CAP_MOVE_GROUND | CAP_OPEN_DOORS | CAP_ANIMATEDFACE | CAP_TURN_HEAD | CAP_USE_SHOT_REGULATOR | CAP_AIM_GUN ) self:SetMaxYawSpeed( 5000 ) //don't touch stuff above here self:SetHealth(100) end
You need to call it after ENT:Initialize as the entity hasn't actually been fully created at that point.
kk EDIT: Maybe ENT:SpawnFunction()??
You didn't give it a Vector() argument, you just gave it three numbers.
EDIT: I tried this one but wont work :/ function ENT:SpawnFunction( ) local self = ents.Create("weapon_seller") local setmodel = self:SetModel( "models/Humans/Group01/Male_03.mdl" ) self:SetModel(setmodel) self:SetPos(Vector(3970, 2829, -12199)) self:Spawn() self:Activate() end
Sorry, you need to Log In to post a reply to this thread.