Add vehicle occupants native wrap
This commit is contained in:
@@ -1471,4 +1471,19 @@ function addAllEventHandlers() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function getVehicleOccupants(vehicle) {
|
||||||
|
let occupants = [];
|
||||||
|
|
||||||
|
let clients = getClients();
|
||||||
|
for (let i in clients) {
|
||||||
|
if (getPlayerVehicle(clients[i]) == vehicle) {
|
||||||
|
occupants.push(clients[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return occupants;
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user