Skip to content

Commit

Permalink
fix: push mp players instead of alt players (#38) (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Vadim Zubkov <[email protected]>
  • Loading branch information
Jengas and vadzz-dev authored Sep 5, 2024
1 parent 094f16f commit 6c5b854
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bindings/src/server/entities/Vehicle.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ alt.on('playerEnteredVehicle', (player, vehicle, seat) => {
vehicle.mp.__occupantsMap = occupants;
}

occupants.set(altSeatToMp(seat), player);
occupants.set(altSeatToMp(seat), player.mp);
});

alt.on('playerLeftVehicle', (player, vehicle, seat) => {
Expand All @@ -411,7 +411,7 @@ alt.on('playerLeftVehicle', (player, vehicle, seat) => {
}

occupants.forEach((p, s) => {
if (p === player) {
if (p === player.mp) {
occupants.delete(s);
}
});
Expand All @@ -425,7 +425,7 @@ alt.on('playerChangedVehicleSeat', (player, vehicle, oldSeat, newSeat) => {
}

occupants.delete(altSeatToMp(oldSeat));
occupants.set(altSeatToMp(newSeat), player);
occupants.set(altSeatToMp(newSeat), player.mp);
});

alt.on('removeEntity', (entity) => {
Expand Down

0 comments on commit 6c5b854

Please sign in to comment.