• spawning a prop
    2 replies, posted
Hello I want to a script that creates a prop using lua. I already made something but it doesent work. In the console it gives the Null entity error. Heres the Code: [lua] function spawnentitys() if game:GetMap() == "gm_construct" then local ent1 = ents.Create("prop_static") ent1:SetAngles(Angle(-0.23, -179.95, 0.01)) ent1:SetPos(Vector(1098.35, 296.11, -127.20)) ent1:SetModel("models/props_wasteland/controlroom_desk001b.mdl") ent1:Spawn() end end hook.Add( "InitPostEntity", "spawnentitys", spawnentitys ) [/lua]
You can't create prop_static's, they're embedded into the map on compile, use prop_physics and :SetMoveType(MOVETYPE_NONE) instead
ok thanks for the info!
Sorry, you need to Log In to post a reply to this thread.