Skip to main content
Server 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, so they never clash with buckets other resources use below that. Bucket 0 is the shared world. A player is in at most one session.
Do not move players between buckets with SetPlayerRoutingBucket while they are in a session. Use Join and Leave.

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. Leave moves the player back to the shared world. An empty session that is not persistent is destroyed. Players also leave when they drop, and every session is destroyed when ug-core stops.

Get / GetMembers / GetSession

table
GetMembers returns an empty list for unknown sessions.

Errors

Invalid options raise.

Events

Hooks

It allows or cancels. Changes to the payload are ignored.

Statebags

Index them with UgCore.Enums.StateBags. See Statebags.

Example