Sync element properties on spawn
This commit is contained in:
@@ -207,16 +207,16 @@ function onServerSpawnedLocalPlayer(state) {
|
|||||||
calledDeathEvent = false;
|
calledDeathEvent = false;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
getPeds().filter(ped => !ped.isType(ELEMENT_PLAYER)).forEach(ped => {
|
getElementsByType(ELEMENT_PED).filter(ped => !ped.isType(ELEMENT_PLAYER)).forEach(ped => {
|
||||||
syncCivilianProperties(ped);
|
syncCivilianProperties(ped);
|
||||||
});
|
});
|
||||||
|
|
||||||
getPlayers().forEach(player => {
|
getElementsByType(ELEMENT_PLAYER).forEach(player => {
|
||||||
syncPlayerProperties(player);
|
syncPlayerProperties(player);
|
||||||
});
|
});
|
||||||
|
|
||||||
getVehicles().forEach(veh => {
|
getElementsByType(ELEMENT_VEHICLE).forEach(vehicle => {
|
||||||
syncVehicleProperties(veh);
|
syncVehicleProperties(vehicle);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user