Spawning a vehicle?


Just create the vehicle as any other entity.
[LUA]local Veh = ents.Create(“prop_vehicle_prisoner_pod”) – Class is important…
Veh:SetModel(“models/props_phx/carseat2.mdl”) – A fairly obvious option.
Veh:SetKeyValue(“vehiclescript”, “scripts/vehicles/prisoner_pod.txt”) – Script your vehicle will use
Veh:SetKeyValue(“limitview”, “0”) – Disable 360 degree view of player, don’t write this if you want it active.

And to make a player enter it you can just use this **[Player.EnterVehicle](**.

Yea ive worked all that out now thanks.

One more thing, could someone give me basic entity example that looks just look an idle citizen.

You want an SNPC who just stands there with its idle animation playing?

Yes, that is correct.
I want an entity though, not a npc.

And NPC is an entity, you could just create a regular entity, set the model of it to the citizen and **[Entity.RestartGesture](**, you’d also need to make some collisions for it, look at the shop NPC’s on gmod, use that for reference.

Good idea, i had a reference entity but i lost it.
Thanks anyway.

[editline]4th June 2011[/editline]

Well i got the npc to spawn now but the cam3D2D does not work now.