GE Lua Documentation

Press F to search!

spawnedVehsToGroup

Definition


-- @/lua/ge/extensions/core/multiSpawn.lua:333

local function spawnedVehsToGroup(ignorePlayer) -- converts all currently spawned vehicles to a group array of vehicle data
  local vehIds = {}

  for _, v in ipairs(getAllVehiclesByType()) do
    if not (ignorePlayer and v:getID() == be:getPlayerVehicleID(0)) then
      table.insert(vehIds, v:getID())
    end
  end

  return vehIdsToGroup(vehIds)
end

Callers

@/lua/ge/extensions/editor/multiSpawnManager.lua
      currGroup.type = "custom"
      currGroup.data = core_multiSpawn.spawnedVehsToGroup()
      selectVehIndex(1)