Add update veh interior util

This commit is contained in:
Vortrex
2021-10-02 16:47:09 -05:00
parent 5c47275780
commit 8f4d7bd900

View File

@@ -957,10 +957,6 @@ function makePedPlayAnimation(ped, animationSlot, positionOffset) {
setElementPosition(ped, getPosToRightOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset)); setElementPosition(ped, getPosToRightOfPos(getElementPosition(ped), fixAngle(getElementHeading(ped)), positionOffset));
break; break;
} }
if(getGame() < GAME_GTA_SA) {
setPlayerMouseCameraState(client, true);
}
} }
triggerNetworkEvent("vrr.pedAnim", null, ped.id, animationData[1], animationData[2], animationData[3], animationData[4], animationData[5], positionOffset); triggerNetworkEvent("vrr.pedAnim", null, ped.id, animationData[1], animationData[2], animationData[3], animationData[4], animationData[5], positionOffset);
} }
@@ -1037,3 +1033,15 @@ function onPlayerNearPickup(client, pickupId) {
} }
// =========================================================================== // ===========================================================================
function updateAllInteriorVehiclesForPlayer(client, interior, dimension) {
for(let i in getServerData().vehicles) {
if(getServerData().vehicles[i].vehicle != false) {
if(getServerData().vehicles[i].interior == interior && getServerData().vehicles[i].dimension == dimension) {
forcePlayerToSyncElementProperties(client, getServerData().vehicles[i].vehicle);
}
}
}
}
// ===========================================================================