Skip to main content
Server Optional module. Proxied to ug-core. A session is a routing bucket owned by ug-core: an instance for an apartment, a race or a heist. Buckets are allocated from 1000 up. Bucket 0 is the shared world. A player is in at most one session.

Create

string
Up to 64 characters.
'strict' | 'relaxed' | 'inactive'
default:"strict"
Client entity creation in the bucket.
boolean
default:"false"
Ambient peds and vehicles.
boolean
default:"false"
Keeps the session when the last member leaves.

Destroy

Moves every member back to the shared world.

Join / Leave

Join leaves the current session first. Sessions:BeforeJoin MAY cancel. Leave returns not_found when the player is in no session. An empty session that is not persistent is destroyed.

Get / GetMembers / GetSession

table
The client reads its session id from the ug-core:Session statebag.

Example