SHV.N getting mdoel name from entity
-
Hye guys,
Could anyone show me how to get a model name (ex: police3) from an vehicle entity.
Thanks!
-
@renevds Here some options
Vehicle currentVehicle = Game.Player.Character.CurrentVehicle; if (currentVehicle != null && currentVehicle.Exists()) { Notification.Show( currentVehicle.ClassDisplayName ); // VEH_CLASS_6 Notification.Show( currentVehicle.ClassLocalizedName ); // Sports Notification.Show( currentVehicle.DisplayName ); // NINEF Notification.Show( currentVehicle.LocalizedName ); // 9F Notification.Show( currentVehicle.Model.Hash.ToString() ); // 1032823388 Notification.Show( ((VehicleHash)currentVehicle.Model.Hash).ToString() ); // Ninef }
-
Thanks you very much, needed this!
-
@renevds you are welcome, if you use IntelliSense you will find a lot of properties and methods that you didn't know about.