getVehicleMaxPassengers
Server
Tells how many passengers fit in a vehicle, not counting the driver.
Also exists on the client, with its own implementation: getVehicleMaxPassengers
int|false getVehicleMaxPassengers(vehicle|string vehicle)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle|string | The vehicle, or a vehicle model's name. |
Returns
The number of passenger seats, or false if the model is unknown.
Example
addCommandHandler("lugares", function(player, command, model)
local seats = getVehicleMaxPassengers(model or "infernus")
outputDebugString(tostring(seats))
end)Coming from MTATakes the model's name instead of its number.