Vehicle fires

This commit is contained in:
Vortrex
2022-02-25 05:29:00 -06:00
parent 41542493d8
commit 36cecc1955
2 changed files with 16 additions and 0 deletions

View File

@@ -901,4 +901,19 @@ function setVehiclePurchaseState(state, vehicleId, position) {
vehiclePurchasePosition = position;
}
// ===========================================================================
function processVehicleFires() {
let vehicles = getElementsByType(ELEMENT_VEHICLE);
for(let i in vehicles) {
if(vehicles[i].isSyncer) {
if(!doesEntityDataExist(vehicles[i], "vrr.fire")) {
triggerNetworkEvent("vrr.vehFire", vehicles[i].id);
} else {
vehicles[i].health = 249;
}
}
}
}
// ===========================================================================