Karmakun 0 Posted March 3 Hello Friendly Coders, I'm currently going crazy, i'm trying to output the vehicle name in chat. Once i enter a car, it should say "You're in an Vehicle. Hash: ${vehicle.model}, Seat: ${seat} , Name: ${vehicleName}". My Code: function playerEnterVehicleHandler(vehicle, seat) { var vehHash = vehicle.model; var vehName = vehHash.toString(); mp.gui.chat.push(`You're in an Vehicle. Hash: ${vehicle.model}, Seat: ${seat} , Name: ${vehicleName}.`); } Anything but the actual name works. I also tried: var vehicleHash = vehicle.model; var vehicleName = vehicleHash.toString(); I could work that out with an Array, but it would consider a lot of work... Any good tipps or work arounds? Best regards Karmakun, thanks for anyhelp! Share this post Link to post Share on other sites
Karmakun 0 Posted March 3 function playerEnterVehicleHandler(vehicle, seat) { var vehicleName = mp.game.ui.getLabelText(mp.game.vehicle.getDisplayNameFromVehicleModel(vehicle.model)); mp.gui.chat.push(`You're in an Vehicle. Hash: ${vehicle.model}, Seat: ${seat} , Name: ${vehicleName}.`); }); } Edit:mp.game.vehicle.getDisplayNameFromVehicleModel whas my answer... That whas a pain my nervs... With all respects, it couldn't got be done a little simplified? Share this post Link to post Share on other sites