Installation
- Download and extract to your resources folder
- Add
ensure pf_smash_and_grabto yourserver.cfg - Configure
script/shared/config.lua - Set up your dispatch integration in
script/server/custom/dispatch.lua - Restart your server
Important: The resource must be named
pf_smash_and_grab.
Dispatch Integration
The resource ships with an empty dispatch hook at script/server/custom/dispatch.lua. Add your dispatch resource's call inside Dispatch.Alert(data):
function Dispatch.Alert(data)
-- data.source = player server id
-- data.coords = vehicle position (vector3)
-- data.netId = vehicle network id
-- data.item = item name stolen
-- data.count = item count stolen
-- Example: lb-tablet
exports["lb-tablet"]:AddDispatch({
priority = "medium",
code = "10-62",
title = "Vehicle Break-In",
description = "A vehicle break-in has been reported.",
job = "police",
time = 5,
location = {
label = "Vehicle Break-In",
coords = vec2(data.coords.x, data.coords.y),
},
blip = {
sprite = 326,
color = 1,
size = 1.2,
label = "10-62 - Vehicle Break-In",
},
})
end