Vehicle fires
This commit is contained in:
@@ -95,6 +95,7 @@ function onProcess(event, deltaTime) {
|
||||
processGameSpecifics();
|
||||
processNearbyPickups();
|
||||
processVehiclePurchasing();
|
||||
processVehicleFires();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
@@ -902,3 +902,18 @@ function setVehiclePurchaseState(state, vehicleId, 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user