client.lua
This file is the client-side police alarm hook. It is intentionally left open so you can plug Car Thief into whatever dispatch system your server uses.
TriggerAlarm
Lua
function TriggerAlarm(coords, plate)
-- TODO implement your police call logic here (client side) or go to
-- configs/server.lua to implement it server side
TriggerServerEvent("devhub_carThief:server:triggerAlarm", coords, plate)
end- Description: Called whenever the heist should alert the police โ when the thief is caught, and when the thief gets into the stolen vehicle. Add your client-side dispatch call (e.g. a notification, a blip, a
ps-dispatch/cd-dispatchtrigger) inside this function. - Parameters:
- coords (
vector3): where the alarm was raised. - plate (
string): license plate of the stolen vehicle (may benil).
- coords (
- Note: By default it forwards the alarm to the server (
devhub_carThief:server:triggerAlarm) so you can also handle it inserver.lua. Keep this line if you handle dispatch server-side.