mirror of
https://github.com/GTAmodding/modelviewjs.git
synced 2025-07-09 10:30:14 +02:00
Add color validation #2
This commit is contained in:
parent
eaf4eecb38
commit
3e30124d66
10
loaddata.js
10
loaddata.js
@ -14,7 +14,15 @@ SetCarColors(cols)
|
|||||||
];
|
];
|
||||||
if(cols !== undefined)
|
if(cols !== undefined)
|
||||||
for(let i = 0; i < cols.length; i++){
|
for(let i = 0; i < cols.length; i++){
|
||||||
let col = VehicleColours[cols[i]];
|
// GTA color ID
|
||||||
|
let colorID = cols[i];
|
||||||
|
|
||||||
|
// RGB color
|
||||||
|
let col = VehicleColours[colorID];
|
||||||
|
if(!col) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
carColors[i][0] = col[0];
|
carColors[i][0] = col[0];
|
||||||
carColors[i][1] = col[1];
|
carColors[i][1] = col[1];
|
||||||
carColors[i][2] = col[2];
|
carColors[i][2] = col[2];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user