Skip to content

XsGetLocalPlayerId

Read local player id from native game state.

XsGetLocalPlayerId()

Inputs: None.

Output: value, available: integer when available is true; nil, false when unavailable.

Errors and unavailable states: Invalid IDs or an unavailable native query return nil, false; use the availability flag before reading the value.

See Low-level queries for related calls and usage notes.