> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# API & events

> Public RCO Creator hooks for selection and integration state.

Most integrations should continue to use their framework's normal loaded/spawn lifecycle. Creator's API is for resources that specifically need to **open selection** or **know whether the player is still in the selection scene**.

## Server: `OpenCharacterSelection`

```lua theme={"dark"}
local ok, reason = exports['rco-creator']:OpenCharacterSelection(source)
```

Use the optional force behavior only when you deliberately want to reopen selection for a player who is already active:

```lua theme={"dark"}
local ok, reason = exports['rco-creator']:OpenCharacterSelection(source, true)
```

The function fails safely instead of stacking another selection session. Reasons can include states such as an already-open selection or an already-active character.

Do not call this from an untrusted client event without your own server-side authorization.

## Client: `IsSelectionSceneActive`

```lua theme={"dark"}
local active = exports['rco-creator']:IsSelectionSceneActive()
```

Useful for UI resources that should stay hidden while the player is choosing/creating a character.

Example:

```lua theme={"dark"}
if exports['rco-creator']:IsSelectionSceneActive() then
    return
end

OpenMyHud()
```

## Framework lifecycle is still the primary integration surface

<Tabs>
  <Tab title="RSG Core">
    Normal resources should keep following the expected RSG player-loaded lifecycle. Creator completes it after appearance, final position and world readiness are resolved.
  </Tab>

  <Tab title="VORP Core">
    `vorp_core` remains the owner of its character/spawn/death lifecycle. Creator integrates with those entry points rather than asking every VORP resource to learn a second set of RCO events.
  </Tab>
</Tabs>

Read [Character lifecycle](/rco-creator/lifecycle) before changing third-party HUD/inventory/medical code.

## Spawn admin command

```text theme={"dark"}
/rcospawns
```

This is an administrator feature, not an API for players to submit coordinates. See [Spawn locations](/rco-creator/spawn-locations).

## Security model

Client/NUI data is a request. Character identity, slot entitlement and final spawn authorization are server decisions.

That same rule should apply to your integrations: if your resource opens character selection or grants a special flow, authorize it on the server first.
