ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getVehiclesOfType

Function

getVehiclesOfType

ServerVehiclesTrilogy Hub only

Returns every existing vehicle of a model, e.g. all taxis on the map.

Syntax

table getVehiclesOfType(int model)

Arguments

modelint
Vehicle model ID.

Returns

An array of vehicles.

Example

for _, taxi in ipairs(getVehiclesOfType(420)) do
    setVehicleTaxiLightOn(taxi, true)
end

See also