Get a vehicles print name/entity name

OnEntityCreated hook:
[LUA]
if ( ent:IsVehicle() ) then
[/LUA]

How do I print the entities name as it appears in the scoreboard, aswell as it’s entities name?
It’s for TDM cars.

Thanks.

GetName, GetClass?

GetClass is prop_vehicle_jeep, GetName is nil.

So you’ve got the entity class, what else do you want?

The print name or the entity name, like m1tdm for the BMW M1 1981 TDM car.

You have the entity name. It’s prop_vehicle_jeep.

I believe he wants it so, instead of printing prop_vehicle_jeep, it prints jeep, maybe he is making a hud or something…

If there is no name set, then you can’t get it.

It sounds like you want the model, not the class, which is GetModel().