GetVehicleNumberOfSeats
From Onset Developer Wiki
Description
Returns the amount of seats a given vehicle has.
Syntax
GetVehicleNumberOfSeats(vehicle)
Parameters
- vehicle
The vehicle identifier.
Return Value
- Number of valid seats the given vehicle has. Returns false on error.
Example
function cmd_vehicleseats(player, vehicle)
if (vehicle == nil) then
return AddPlayerChat(player, "Usage: /vehicleseats <vehicle>")
end
if (not IsValidVehicle(vehicle)) then
return AddPlayerChat(player, "Vehicle (ID: "..vehicle..") does not exist")
end
local seats = GetVehicleNumberOfSeats(vehicle)
AddPlayerChat(player, "Vehicle "..vehicle.." has "..seats)
end
AddCommand("passengers", cmd_passengers)
See also
- CreateVehicle
- DestroyVehicle
- IsValidVehicle
- GetVehicleCount
- GetAllVehicles
- GetVehicleModel
- GetVehicleModelName
- SetVehicleRespawnParams
- IsVehicleStreamedIn
- GetStreamedVehiclesForPlayer
- GetStreamedVehicles
- SetVehicleLocation
- GetVehicleLocation
- SetVehicleRotation
- GetVehicleRotation
- SetVehicleHeading
- GetVehicleHeading
- SetVehicleHealth
- GetVehicleHealth
- SetVehicleLicensePlate
- GetVehicleVelocity
- GetVehicleDriver
- GetVehiclePassenger
- GetVehicleNumberOfSeats
- SetVehicleColor
- GetVehicleColor
- SetVehicleLinearVelocity
- SetVehicleAngularVelocity
- GetVehicleGear
- SetVehicleHoodRatio
- GetVehicleHoodRatio
- SetVehicleTrunkRatio
- GetVehicleTrunkRatio
- StartVehicleEngine
- StopVehicleEngine
- GetVehicleEngineState
- SetVehicleLightEnabled
- GetVehicleLightState
- SetVehicleDamage
- GetVehicleDamage
- AttachVehicleNitro