For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exports/Events

Client exports, server callbacks, and net events for integrations.

Client exports

toggleGPS

Open, close or toggle the handheld GPS UI.

-- Toggle current state
exports['0r-gps']:toggleGPS()

-- Force open
exports['0r-gps']:toggleGPS(true)

-- Force close
exports['0r-gps']:toggleGPS(false)

Parameters

Name
Type
Description

state

boolean?

Optional forced state. true = open, false = close

Returns

Type
Description

boolean

Current visibility state after toggle


isOpen

Returns whether the GPS UI is currently open.

Returns

Type
Description

boolean

GPS visibility state


getChannelId

Returns the current connected channel ID.

Returns

Type
Description

number

Current frequency ID, or 0 if not connected


getChannelMembers

Returns all members currently synced in the active channel.

Returns

Type
Description

table

Array of member server IDs


joinChannel

Join a GPS channel.

Parameters

Name
Type
Description

channelId

number

Target channel/frequency ID

password

string?

Optional channel password

Returns

Type
Description

boolean

Whether the join request succeeded


leaveChannel

Leave the current GPS channel.

Returns

Type
Description

boolean

Whether leaving succeeded


Useable Events

Client

Event
Purpose

0r-gps:client:toggleGPS

Open GPS UI (from usable item)


State bags

Useful for other scripts that read player state:

Bag
Values

gpsStatus

foot, vehicle, boat, plane, motorcycle, bike, helicopter, dead

gpsSiren

true / false — emergency lights

gpsPunishment

true when water punishment (coord punishment) is active

Last updated