Vehicle::livery: Difference between revisions
m (A grammatical error was fixed.) |
m (Another grammatical error was fixed. Some text was clarified better.) |
||
| Line 12: | Line 12: | ||
[[File:Livery2.png|200px|thumb|left|police livery 2]] | [[File:Livery2.png|200px|thumb|left|police livery 2]] | ||
"police" has 5 | "police" has 5 liveries. (Rooftop numbers: 32, 76, 05, 84, 43). | ||
== Example == | == Example == | ||
Latest revision as of 22:34, 5 October 2020
This property using for getting or setting vehicle livery.
Setter
- int livery value
Getter
- int livery value
Example Vehicle Livery



"police" has 5 liveries. (Rooftop numbers: 32, 76, 05, 84, 43).
Example
mp.events.addCommand({
//... other commands
'livery' : (player, _, livery) => {
if(!player.vehicle) return; // check if player in vehicle or not
if(!livery || livery < 0) return; // check player input livery or not, and livery less than 0
player.vehicle.livery = JSON.parse([livery]); // set vehicle's livery
},
//... other commands
});