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