M MY Multiplayer: Wiki
Side
Kind

getVehicleMaxPassengers

Client

Tells how many passengers fit in a vehicle, not counting the driver.

Also exists on the server, with its own implementation: getVehicleMaxPassengers

int|false getVehicleMaxPassengers(vehicle|string vehicle)

Parameters

NameTypeDescription
vehiclevehicle|stringThe vehicle, or a vehicle model's name.

Returns

The number of passenger seats, or false if the model is unknown.

Example

local vehicle = getPedOccupiedVehicle(localPlayer)
if vehicle then
    outputDebugString("Passageiros: " .. getVehicleMaxPassengers(vehicle))
end
Coming from MTATakes the model's name instead of its number.

See also