Sync vehicle panel stuff + remove all default upgrades on SA

This commit is contained in:
Vortrex
2022-02-04 10:35:55 -06:00
parent 80453b7b5c
commit 160e48a121

View File

@@ -84,33 +84,43 @@ function syncVehicleProperties(vehicle) {
}
}
//if(doesEntityDataExist(vehicle, "vrr.panelStatus")) {
// let panelsStatus = getEntityData(vehicle, "vrr.panelStatus");
// for(let i in panelsStatus) {
// vehicle.setPanelStatus(i, panelsStatus[i]);
// }
//}
if(doesEntityDataExist(vehicle, "vrr.invincible")) {
let invincible = getEntityData(vehicle, "vrr.invincible");
element.setProofs(invincible, invincible, invincible, invincible, invincible);
}
//if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) {
// let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus");
// for(let i in wheelsStatus) {
// vehicle.setWheelStatus(i, wheelsStatus[i]);
// }
//}
if(doesEntityDataExist(vehicle, "vrr.panelStatus")) {
let panelsStatus = getEntityData(vehicle, "vrr.panelStatus");
for(let i in panelsStatus) {
vehicle.setPanelStatus(i, panelsStatus[i]);
}
}
//if(doesEntityDataExist(vehicle, "vrr.lightStatus")) {
// let lightStatus = getEntityData(vehicle, "vrr.lightStatus");
// for(let i in lightStatus) {
// vehicle.setLightStatus(i, lightStatus[i]);
// }
//}
if(doesEntityDataExist(vehicle, "vrr.wheelStatus")) {
let wheelsStatus = getEntityData(vehicle, "vrr.wheelStatus");
for(let i in wheelsStatus) {
vehicle.setWheelStatus(i, wheelsStatus[i]);
}
}
//if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) {
// let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight");
// vehicle.setSuspensionHeight(suspensionHeight);
//}
if(doesEntityDataExist(vehicle, "vrr.lightStatus")) {
let lightStatus = getEntityData(vehicle, "vrr.lightStatus");
for(let i in lightStatus) {
vehicle.setLightStatus(i, lightStatus[i]);
}
}
if(doesEntityDataExist(vehicle, "vrr.suspensionHeight")) {
let suspensionHeight = getEntityData(vehicle, "vrr.suspensionHeight");
vehicle.setSuspensionHeight(suspensionHeight);
}
if(getGame() == VRR_GAME_GTA_SA) {
let allUpgrades = getGameData().vehicleUpgrades[getGame()];
for(let i in allUpgrades) {
vehicle.removeUpgrade(i);
}
if(doesEntityDataExist(vehicle, "vrr.upgrades")) {
let upgrades = getEntityData(vehicle, "vrr.upgrades");
for(let i in upgrades) {
@@ -131,18 +141,6 @@ function syncVehicleProperties(vehicle) {
}
}
}
if(getGame() == VRR_GAME_GTA_III) {
if(vehicle.isOwner && vehicle.modelIndex == 116) {
vehicle.colour1 = 0;
vehicle.colour2 = 1;
}
} else if(getGame() == VRR_GAME_GTA_VC) {
if(vehicle.isOwner && vehicle.modelIndex == 156) {
vehicle.colour1 = 0;
vehicle.colour2 = 1;
}
}
}
// ===========================================================================