Anonymous

Not logged in

  • Log in
Onset Developer Wiki

GetAllVehicles

From Onset Developer Wiki

Namespaces

  • Page
  • Discussion

More

  • More

Page actions

  • Read
  • View source
  • History
GetAllVehicles

Type: Function
Context: Server
Introduced: v1.0

Contents

  • 1 Description
  • 2 Syntax
    • 2.1 Parameters
    • 2.2 Return Value
  • 3 Example
  • 4 See also

Description

Get all the vehicle identifiers in a table.

Syntax

GetAllVehicles()

Parameters

  • This function has no parameters.

Return Value

  • This function returns a table with valid vehicle identifiers.

Example

for k, v in pairs(GetAllVehicles()) do
    SetVehicleColor(v, RGB(255, 0, 0)) -- Sets all the created vehicles' color to 255, 0, 0 (RGB) red.
end

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
Retrieved from "https://dev.playonset.com/index.php?title=GetAllVehicles&oldid=3636"

Navigation

Navigation

  • Main page
  • Recent changes
  • Random page
  • Help about MediaWiki
  • Steam Forums
  • Discord

Wiki tools

Wiki tools

  • Special pages

Page tools

Page tools

    Userpage tools

      More

      • What links here
      • Related changes
      • Printable version
      • Permanent link
      • Page information
      • Page logs
      • (c) 2022 Blue Mountains GmbH
      • Powered by MediaWiki
      • This page was last edited on 16 January 2020, at 17:20.
      • (c) 2022 Blue Mountains GmbH
      • Privacy policy
      • About Onset Developer Wiki
      • Disclaimers