SAFScriptsDocs

Configuration

On this page

Everything is in config.lua. Framework and inventory hooks are in bridge/, covered in Custom servers.

Framework and inventory

OptionDefaultWhat it does
Config.Framework'auto''auto', 'qbx', 'qb', 'esx', 'nd', 'ox' or 'standalone'
Config.Inventory'auto''auto', 'ox_inventory', 'qb-inventory', 'ps-inventory', 'lj-inventory', 'qs-inventory', 'codem-inventory', 'core_inventory', 'tgiann-inventory', 'jaksam_inventory', 'origen_inventory', 'framework' or 'none'

'framework' reads items on the ESX or QBCore player. 'none' means no items are needed. Set these by hand if you renamed a resource.

Staff

OptionDefaultWhat it does
Config.StaffAce'scenes.staff'ACE for staff: permanent and locked scenes, longer view distance, remove anyone's scene
Config.StaffGroupsadmin, superadmin, god, modFramework groups that also count as staff (ESX groups, QBCore permissions, ACE group.<name>)

Commands and messages

OptionDefaultWhat it does
Config.NotifyTitle'Scenes'Title on notifications
Config.Command'scene'Opens the editor
Config.ToggleCommand'scenes'Shows or hides every scene on your own screen

Limits

OptionDefaultWhat it does
Config.MaxText160Characters in a normal scene
Config.MaxGraffiti28Characters in a spray tag
Config.MaxPerPlayer6Scenes one player can have up at once. Staff ignore this
Config.CooldownSeconds4Seconds between placing scenes
Config.MaxDistance30.0Furthest view distance a player can pick. Staff can pick up to 80
Config.PlaceReach12.0How far you can aim when placing
Config.Slots10How many scenes can be drawn at once. Each uses one small browser texture

Expiry

OptionDefaultWhat it does
Config.Expiry{ 5, 15, 30, 60, 180, 360, 1440, 0 }Choices in minutes. 0 is permanent, staff only
Config.DefaultExpiry60Choice selected when the editor opens

Fonts

Fonts ship with the resource in ui/fonts/, so every player sees the same thing. All are under the SIL Open Font License.

OptionDefaultWhat it does
Config.Fonts7 fontsBarlow, Oswald, Archivo Black, Roboto Slab, IBM Plex Mono, Permanent Marker, Caveat
Config.LegacyFontssystem fontsFonts older scenes were made with. Still accepted, so editing an old scene doesn't change its look

Spray tags

OptionDefaultWhat it does
Config.SprayItem'spray_can'Item needed to place a tag
Config.CleanItem'cleaning_rag'Item needed to wipe one off
Config.CleanSeconds6How long cleaning takes

Text filter

Text is compared lower case with look-alike characters folded (1 to i, 3 to e, 0 to o, @ to a, $ to s), so simple swaps don't get past it.

OptionDefaultWhat it does
Config.BlockedWords{}Your own words to block
Config.BlockPatternslinks and invitesLua patterns that are always blocked
Lua
Config.BlockedWords = { 'badword', 'anotherone' }
Config.BlockPatterns = { 'http', 'www%.', '%.com', '%.gg', 'discord%.' }

Links and Discord invites are always blocked by the default patterns.

Discord log

OptionDefaultWhat it does
Config.Webhook''A Discord webhook link to log every scene placed and removed. '' turns it off

Rendering fixes

OptionDefaultWhat it does
Config.FlipWindingfalseFlip this if a panel shows up mirrored or not at all on a wall
Config.MirrorUfalseFlip this together with FlipWinding if the text reads backwards
SAF Scripts by San Andreas' Finest StoreDiscordsupprot@safrp.org

Not affiliated with or endorsed by Rockstar Games, Take-Two Interactive or Cfx.re.