Installation
Installation
1. Dependencies
Install and start ox_lib before this resource. If you plan to use database storage, oxmysql must also be running.
2. Drop the resource in
Place bupa-safezonecreator in your resources folder (for example inside a [BUPA] category folder) and add it to your server.cfg.
3. server.cfg — ensure order
ox_lib (and oxmysql, if used) must start before the resource.
ensure ox_lib
ensure oxmysql # only if you use Storage = 'db'
ensure bupa-safezonecreator4. Admin access
Opening the creator is gated. During testing it is open to everyone — lock it down before you go live.
Config.AdminOnly = false -- TODO: set true before release (currently open to everyone)
Config.AdminAce = 'bupa.safezone'
Config.AdminGroups = { 'admin', 'superadmin', 'god' }
Config.CustomAdmin = false -- true = use your own IsPlayerAdmin() in server/editable.luaOnce AdminOnly = true, a player passes the gate if any of these is true:
- They hold the ACE permission — grant it with:
add_ace group.admin bupa.safezone allow
- Their framework group is in
Config.AdminGroups(ESX group, QB-Core job name /HasPermission('admin'), QBox job name). Config.CustomAdmin = trueand yourEditable.isAdmin(src)inserver/editable.luareturnstrue.
Config.AdminOnly ships as false so you can test immediately. Set it to true before release, or anyone can open the creator.
5. Storage — JSON or database
Config.Storage = 'json' -- 'json' | 'db'json(default) — zones are written todata/zones.jsoninside the resource. Zero setup.db— zones are stored in oxmysql. The table is created automatically on first start; you do not need to import any SQL:
CREATE TABLE IF NOT EXISTS bupa_safezones (
id VARCHAR(64) PRIMARY KEY,
data LONGTEXT
);6. Language
Language is set globally via ox_lib's locale convar. Add to server.cfg:
setr ox:locale "tr"English is the fallback for any missing key. See Localization for the full list of shipped languages.
