GE / gameplay_police
API gameplay_police
Children
Functions
function arrestVehicle(id, showMessages) -- instantly sets a vehicle as arrested
function checkRoadblock(vehIds, rbWidth, useLength) -- checks how many of the input vehicles can fit in a roadblock
function evadeVehicle(id, showMessages) -- instantly sets a vehicle as evaded
function getNearestPoliceVehicle(targetId, isVisible, isUsable) -- returns the nearest police car from the given vehicle, with a few options
function getPursuitVars()
function getPoliceVehicles()
function getPursuitData(id) -- returns pursuit data from the given vehicle, or the player vehicle by default
function getPursuitVars()
function insertProp(propId) -- adds a prop to use for roadblocks
function isVehicleInPursuit(id, targetId) -- returns the pursuit status of a vehicle (targetId is optional, to filter the suspect)
function onClientEndMission()
function onDeserialized(data)
function onSerialize()
function onTrafficAction(id, action, data)
function onTrafficStarted()
function onTrafficStopped()
function onTrafficVehicleAdded(id)
function onTrafficVehicleRemoved(id)
function onUpdate(dt, dtSim)
function onVehicleResetted(id)
function onVehicleSwitched(oldId, newId)
function placeRoadblock(vehIds, pos, rot, placeData) -- places a roadblock
function releaseVehicle(id, showMessages) -- unfreezes controls and lets a vehicle continue after an arrest
function removeProp(propId) -- removes a prop from the props list
function setPursuitVars(data) -- sets various traffic variables
function setPropsActive(active, reset)
function setPursuitMode(mode, targetId, policeIds) -- sets pursuit mode; -1 = busted, 0 = off, 1 and higher = pursuit level
function setPursuitVars(data) -- sets various traffic variables
function setSuspect(id) -- changes a traffic vehicle's role to 'suspect'
function setSuspectTimer(time) -- sets the time until the next suspect will be queued
function setupPursuitGameplay(suspectId, policeIds, options) -- helper function for setting up pursuit gameplay