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

  1. Drop sbspeedtraps into your resources folder.
  2. Start it after oxmysql and SB Bridge:
Config
ensure oxmysql
ensure sbbridge
ensure sbspeedtraps
  1. Map: html/map.png is included and calibrated in Config.Map. Positions picked on the map can be a few metres off, so check new traps in game.
  2. 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, run sql/sb_speedtraps.sql yourself.
  3. Add the ticket item. See Tickets and Licences.
  4. Set Config.Dispatch.System and check dispatch.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