getTrafficAmount
Definition
-- @/lua/ge/extensions/gameplay/traffic.lua:93
local function getTrafficAmount(activeOnly) -- returns current amount of AI traffic (optionally only active vehicles)
return activeOnly and min(vars.activeAmount, #trafficAiVehsList) or #trafficAiVehsList
end
Callers
@/lua/ge/extensions/gameplay/traffic.lua
local amount, activeAmount = getTrafficAmount(), getTrafficAmount(true)
log('I', logTag, string.format('Traffic system started with %d active / %d total vehicles', activeAmount, amount))
local amount, activeAmount = getTrafficAmount(), getTrafficAmount(true)
log('I', logTag, string.format('Traffic system started with %d active / %d total vehicles', activeAmount, amount))