Use in vehicle seat var instead of loop

This commit is contained in:
Vortrex
2023-02-08 17:59:52 -06:00
parent 07187b99ce
commit 66109a8fe9

View File

@@ -285,11 +285,13 @@ function setLocalPlayerDrunkEffect(amount, duration) {
// =========================================================================== // ===========================================================================
function getLocalPlayerVehicleSeat() { function getLocalPlayerVehicleSeat() {
for (let i = 0; i <= 4; i++) { return inVehicleSeat;
if (localPlayer.vehicle.getOccupant(i) == localPlayer) {
return i; //for (let i = 0; i <= 4; i++) {
} // if (localPlayer.vehicle.getOccupant(i) == localPlayer) {
} // return i;
// }
//}
} }
// =========================================================================== // ===========================================================================