Installation
Requirements
- SB Bridge, which handles the framework, notifications, text UI, target, inventory, money, the admin check and phone emails
- oxmysql
SB Speedtraps is set up in SB Bridge's config, not in this script, so pick the framework, notify, text UI, target and inventory there.
Steps
- Drop
sbspeedtrapsinto your resources folder. - Start it after oxmysql and SB Bridge:
Config
ensure oxmysql
ensure sbbridge
ensure sbspeedtraps- Map:
html/map.pngis included and calibrated inConfig.Map. Positions picked on the map can be a few metres off, so check new traps in game. - Database: nothing to do. Tables, speed tiers and the preconfigured traps are created on first start (
Config.AutoCreateTables). If your database user can't create tables, runsql/sb_speedtraps.sqlyourself. - Add the ticket item. See Tickets and Licences.
- Set
Config.Dispatch.Systemand checkdispatch.lua.
Tables
| Table | What it stores |
|---|---|
sb_speedtraps |
Trap locations, label, position, heading, one-way, tier, active state and blip |
sb_speedtrap_tiers |
Speed tiers: speed, blip colour, base fine, per-unit fine and maximum fine |
sb_speedtickets |
Every ticket, with citizen ID, name, plate, vehicle, speed, limit, fine, trap, street, status (unpaid, overdue or paid) and dates |
sb_speedtrap_mail |
Phone emails waiting for an offline player |
sb_speedtickets_revoked |
Citizens whose licence this script revoked, so it only gives back licences it took away |
Last updated 2026-11-08
