Specific Vehicles based upon the .txt file

Say I wanted to “Buy” a lotus_elise from the SicknessCar’s. Well, I cant use ents.Create(“lotus_elise”) because it isn’t an actual vehicle, just a derivation of the jeep. How would I go about spawning the vehicle? Would I have to change the class, I utterly have no idea.

Wiki Quote: Further Example

*  All static vehicle entities (e.g. the Airboat seat from PHX) use the prop_vehicle_prisoner_pod with a different model.
* The **Vehicle** object is a **child** of Entity. 

[lua]
local CarObj = ents.Create(“prop_vehicle_jeep”)
CarObj:SetModel(“models/mymodel.mdl”)
CarObj:SetKeyValue(“vehiclescript”,“scripts/myscript.txt”)
CarObj:SetPos(ply:GetEyeTrace().HitPos)
CarObj:Spawn()
CarObj:Activate()
[/lua]

Thank you, I can’t believe it was so simple.

:confused: When you create your vehicle simply set it’s script and model the way Gbps described it.

Yea, I found a quick workaround.