• Get a vehicles print name/entity name
    7 replies, posted
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?
[QUOTE=Tomvdr;42416725]GetName, GetClass?[/QUOTE] GetClass is prop_vehicle_jeep, GetName is nil.
[QUOTE=Busan1;42417268]GetClass is prop_vehicle_jeep, GetName is nil.[/QUOTE] So you've got the entity class, what else do you want?
[QUOTE=ms333;42417678]So you've got the entity class, what else do you want?[/QUOTE] The print name or the entity name, like m1tdm for the BMW M1 1981 TDM car.
[QUOTE=Busan1;42418363]The print name or the entity name, like m1tdm for the BMW M1 1981 TDM car.[/QUOTE] You have the entity name. It's prop_vehicle_jeep.
[QUOTE=Ghost_Sailor;42425520]You have the entity name. It's prop_vehicle_jeep.[/QUOTE] 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().
Sorry, you need to Log In to post a reply to this thread.