Spawning vehicle with lua

Sup, i just got tdm cars on my server, i want to spawn them from code but i am not sure how to find the class name of them.

I am using this code:



car = ents.Create("tdmcars_c4")
car:SetModel("models/tdmcars/cit_c4.mdl")
car:SetPos(ply:GetPos()+Vector(100,0,0))
car:Spawn()


Error: http://puu.sh/1S3Fx

Thanks.

bump

You haven’t set owner of the vehicle. do car:SetOwner(ply)

That isn’t his problem.

tdmcars_c4 isn’t an entity according to the error.