Sit Creator

Configuration

Configuration

Everything below is in config.lua, the only file you need to edit. It isn't encrypted. Save it and restart the resource.

Language, framework, target

Config.Locale    = 'es'     -- 'es' (Spanish) | 'en' (English)
Config.Framework = 'auto'   -- 'auto' | 'qbx' | 'qb' | 'esx' | 'standalone'
Config.Target    = 'auto'   -- 'auto' | 'ox' | 'qb'
Option Default What it changes
Config.Locale 'es' Language of every text, including the style names
Config.Framework 'auto' auto looks for qbx_core, qb-core, then es_extended; without any of them it runs standalone
Config.Target 'auto' auto uses ox_target or qb-target, whichever is started

Admin commands and permission

Config.Command     = 'createchair'
Config.ListCommand = 'chairs'
Config.Permission  = 'group.admin'
Config.AdminGroups = { 'admin', 'god', 'superadmin' }
Option Default What it changes
Config.Command 'createchair' Command to place new seat points
Config.ListCommand 'chairs' Command that opens the list of every seat
Config.Permission 'group.admin' ACE group whose members are admins. With qbx_core, group.admin = admin + god, group.mod = mod + admin + god, group.god = god only
Config.AdminGroups admin, god, superadmin Framework groups that are admins too: QB-Core permissions, ESX groups, Qbox groups

Keys while sitting

Config.Controls = {
    leave = 73, -- X
    style = 38, -- E: opens the style list (ox_lib menu)
}
Config.StyleMenuPosition = 'top-left'
Option Default What it changes
Controls.leave 73 (X) GTA control ID that stands you up
Controls.style 38 (E) GTA control ID that opens the style list
StyleMenuPosition 'top-left' Where the style list shows: 'top-left', 'top-right', 'bottom-left' or 'bottom-right'

These are GTA control IDs (see the FiveM controls list), not key names.

Distances

Config.TargetDistance = 2.0
Config.CancelDistance = 1.5
Config.LegacyZOffset  = 0.0
Option Default What it changes
TargetDistance 2.0 How close you must be to pick Sit down, in metres
CancelDistance 1.5 If the ped ends up this far from the seat (teleport, push…), the sit is cancelled
LegacyZOffset 0.0 Height offset for old seat points still marked as not adjusted. Adjusting a seat with the gizmo clears the mark

Sitting styles

Config.SitEmote = {
    { name = 'Inclinado', en = 'Leaning back', dir = 'timetable@ron@ig_3_couch', anim = 'base', offset = { f = 0.0, l = 0.0 } },
    -- ...
    { name = 'Con laptop', en = 'With laptop', dir = 'mouse@female_sitting_laptop', anim = 'female_sitting_laptop_clip', offset = { f = -0.45, l = 0.0 },
      prop = { model = 'ba_prop_club_laptop_dj_02', bone = 57005, pos = vec3(0.0860, -0.1370, -0.1750), rot = vec3(-79.9999, -90.0, 0.0) } },
}
Field What it is
name / en Style name in Spanish / English
dir / anim Animation dictionary and clip
offset.f / offset.l / offset.z Forward / left / up offset from the seat point, in metres
prop Optional hand prop while sitting: model, bone, pos offset and rot in degrees

The 14 styles shipped:

Style (es) Style (en) Animation source
Inclinado Leaning back Base game
Piernas abiertas Legs apart Base game
Piernas cruzadas Legs crossed Base game
Cruzada 2 Crossed 2 rpemotes-reborn
Cruzada 3 Crossed 3 Base game
De lado Sideways Base game
Elegante Elegant rpemotes-reborn
Hacia adelante Leaning forward rpemotes-reborn
Brazos cruzados Arms folded rpemotes-reborn
Butaca Armchair rpemotes-reborn
Recostado Reclined Base game
Con laptop With laptop rpemotes-reborn (+ laptop prop)
Con tablet With tablet rpemotes-reborn (+ tablet prop)
Leyendo Reading rpemotes-reborn (+ book prop)

Add, remove or reorder entries freely. Players' remembered style is stored as a position in this list.

Prop seats (optional)

Config.PropSeats = false

Config.Objects = {
    [`prop_bench_01a`] = vec3(0, 0, 0),
    [`v_ilev_fh_kitchenstool`] = vec3(0, 0, 0.4),
    -- ...
}
Option Default What it changes
PropSeats false true adds Sit down to every model in Config.Objects, without placing seat points
Objects 109 models Model → extra offset in the prop's local space (x right, y forward, z up). You sit at the spot you aim at along the seat

It's off by default because generic offsets don't sit you right on every chair. Seat points from /createchair are exact.

Resume after drinking

Config.ResetAnim = {
    { dict = 'anim@amb@nightclub@mini@drinking@drinking_shots@ped_a@normal@', anim = 'drink' },
    { dict = 'anim@amb@nightclub@mini@drinking@drinking_shots@ped_a@normal', anim = 'drink' },
    { dict = 'amb@world_human_drinking@coffee@male@idle_a', anim = 'idle_a' },
}

If one of these animations interrupts the sit, the sitting animation plays again when it ends instead of standing you up. Add the dictionaries of your own consumable scripts here.

Quick reference

Want to… Set
Switch to English Config.Locale = 'en'
Let moderators place seats Config.Permission = 'group.mod'
Rename /createchair Config.Command = 'crearsilla'
Show the style list on the right Config.StyleMenuPosition = 'top-right'
Sit on GTA chairs without seat points Config.PropSeats = true
Remove the styles that need rpemotes-reborn Delete those entries from Config.SitEmote
Keep players seated while they drink Add the drink animation to Config.ResetAnim

Merry Christmas.

From Suty.