Add entity process event
This commit is contained in:
@@ -53,6 +53,8 @@ function addAllEventHandlers() {
|
||||
addEventHandler("OnCameraProcess", onCameraProcess);
|
||||
|
||||
addEventHandler("OnMouseWheel", onMouseWheel);
|
||||
|
||||
addEventHandler("OnEntityProcess", onEntityProcess);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -99,6 +101,7 @@ function onProcess(event, deltaTime) {
|
||||
processVehicleBurning();
|
||||
//checkChatBoxAutoHide(); // Will be uncommented on 1.4.0 GTAC update
|
||||
//processVehicleFires();
|
||||
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -236,3 +239,15 @@ function onMouseWheel(event, mouseId, deltaCoordinates, flipped) {
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function onEntityProcess(event, entity) {
|
||||
if(!isSpawned) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//if(entity.isType(ELEMENT_PED) && !entity.isType(ELEMENT_PLAYER)) {
|
||||
// processNPCMovement(entity);
|
||||
//}
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
Reference in New Issue
Block a user