Skittes Posted October 24, 2018 Share Posted October 24, 2018 (edited) What's wrong? TypeError: player.vehicle.setLivery is not a function player.vehicle.setLivery(parseInt(livery, 10)); script: mp.events.addCommand('setlivery', (player, string, livery) => { if (player.vehicle) { if(!string){ return player.outputChatBox("Syntax: /setlivery [liveryID]"); } else { player.vehicle.setLivery(parseInt(livery, 10)); } } else { return player.outputChatBox("You must be in vehicle"); } }); Edited November 3, 2018 by Skittes update Link to comment Share on other sites More sharing options...
karyunoporo Posted October 25, 2018 Share Posted October 25, 2018 (edited) Hi ! I don't have the time to make this script for the moment but if you want to use vehicles liveries you can use these functions : https://wiki.rage.mp/index.php?title=Vehicle::getLiveryCount https://wiki.rage.mp/index.php?title=Vehicle::setLivery https://wiki.rage.mp/index.php?title=Vehicle::getLivery with this, using a bit NativeUI (or your favorite UI) you can do a small menu to set your livery 😛 Edited October 25, 2018 by karyunoporo Link to comment Share on other sites More sharing options...
Skittes Posted November 3, 2018 Author Share Posted November 3, 2018 (edited) Thanks. Close topic. Edited November 3, 2018 by Skittes Link to comment Share on other sites More sharing options...
cheeck Posted November 9, 2018 Share Posted November 9, 2018 mp.events.addCommand('setLivery', (player, string, livery) => { if(player.vehicle) { if(!string) { return player.outputChatBox("Syntax: /setlivery [liveryID]"); } player.eval(`mp.players.local.vehicle.setLivery(${livery});`) } else { return player.outputChatBox("You must be in vehicle"); } }); Server-Side 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now