GE / gameplay_parking
API gameplay_parking
Children
Functions
function activate(vehIds, ignoreScatter) -- activates a group of vehicles, to allow them to teleport to new parking spots
function checkParkingSpot(vehId, parkingSpot) -- checks if a parking spot is ready to use for a parked vehicle
function deactivate() -- deactivates all parked vehicles
function deleteVehicles(amount)
function disableTracking(vehId) -- disables parking spot tracking for a driving vehicle
function enableTracking(vehId, autoDisable) -- enables parking spot tracking for a driving vehicle
function filterParkingSpots(psList, filters) -- filter the sorted list of parking spots (as returned by findParkingSpots)
function findParkingSpots(pos, minRadius, maxRadius) -- finds and returns a sorted array of parking spot objects and distances
function forceTeleport(vehId, psList, minDist, maxDist) -- forces a parked car to teleport to a new parking spot
function getCurrentParkingSpot(vehId) -- returns the parking spot id of a properly parked vehicle (no tracked data needed)
function getParkedCarsAmount(activeOnly)
function getParkedCarsData()
function getParkedCarsList()
function getParkingSpots() -- returns a table of all current parking spots
function getParkingVars() -- gets parking related variables
function getRandomParkingSpots(originPos, minDist, maxDist, minCount, filters) -- returns a list of random parking spots, with a bias for origin position
function getState()
function getTrackingData()
function insertVehicle(id) -- inserts a new vehicle into the parked cars table
function moveToParkingSpot(vehId, parkingSpot, lowPrecision) -- assigns a parked vehicle to a parking spot
function onClientEndMission()
function onClientStartMission()
function onDeserialized(data)
function onSerialize()
function onUpdate(dt, dtSim)
function onVehicleActiveChanged(vehId, active)
function onVehicleDestroyed(id)
function onVehicleGroupSpawned(vehList, groupId, groupName)
function activate(vehIds, ignoreScatter) -- activates a group of vehicles, to allow them to teleport to new parking spots
function removeVehicle(id) -- removes a vehicle from the parked cars table
function resetAll() -- resets everything
function scatterParkedCars(vehIds, minDist, maxDist) -- randomly teleports all parked vehicles to parking spots
function setActiveAmount(amount) -- sets the maximum amount of active (visible) vehicles
function setParkingVars(data, reset) -- sets parking related variables
function setSites(data) -- sets sites data, can override the default sites data
function setState(val) -- activates or deactivates the parking system
function setupVehicles(amount, options) -- spawns and prepares simple parked vehicles