Skip to content

The handshake accepts a session; spawning is a separate request and grant ​

Status: Accepted (2026-06-30)

Context ​

A connection and a spawned player are different things. Between them lies a stage where the player is connected but not yet in the world: logging in, loading a profile, choosing a skin or a team. If the handshake answer also carries the spawn point, the appearance and the money, it acts as an implicit spawn: the client materializes its player the moment it connects, and none of these stages has room to exist. It also mixes three kinds of data in one packet: the session itself, server-wide configuration, and per-player state that belongs to the gamemode.

The target lifecycle is: handshake accepted, the player is connected but not spawned (PreSpawn), the gamemode decides how and where the player spawns, the spawn is granted, and only then is the player's continuous state valid.

Decision ​

  • ServerHello is session accept plus server-wide configuration. It carries the session (revision, player_id, tokens, the server's identity) and configuration that is the same for everyone at that moment (the world baseline of ADR 0010, drive-by intervals, garage doors, the client files port, the PreAuth flag). It carries no spawn point, no appearance and no money. See ServerHello.
  • The connect spawn is a request and a grant. The client sends RequestSpawn on a timer until it receives SpawnPlayer with the spawn point, heading, interior, skin and variant, and creates or places its player only then. The client's retry makes delivery reliable without the reliable event lane, whose receive state resets on reconnect; a one-shot grant lost on its own would leave the client stuck before spawn. The same request-and-grant shape is used by respawn (ADR 0017).
  • The gamemode decides the spawn. The server grants the connect spawn only after the gamemode has set the spawn info with spawn_player; until then RequestSpawn grants nothing and only keeps the connection alive (ADR 0023). Appearance is part of that spawn info, so each player can look different from the first frame.
  • Money is not part of the handshake. It exists only as server-owned runtime state, sent with SetMoney. A fresh connection starts at 0, which needs no packet. A reconnect is a fresh connection: the gamemode restores whatever it persists, the handshake restores nothing.
  • Continuous state is gated by the spawn. The server accepts PlayerSync only from a player that has been granted its connect spawn. After the first living frame, RequestSpawn is dropped: death and respawn have their own pair (RespawnRequest / RespawnPlayer).
  • Liveness before spawn. PreSpawn may legitimately last long (a login, a class selection), and the server may have nothing to say during it. The server therefore sends ServerKeepalive to every connection once a second, and the client ends the session after 15 s without any packet from the server; a fixed deadline for the spawn would cut off legitimate logins.

Consequences ​

  • The boundary is explicit: the handshake is the session, the spawn grant is the spawn info. Login, profile loading and class selection fit between them without changing the wire contract.
  • The connect spawn costs one extra round trip and one more packet type.
  • Money, appearance and the spawn point belong to the gamemode; the core supplies only a default spawn point (ADR 0012).
  • The connect spawn and the respawn remain two packet pairs. Merging them would touch a working respawn path for no gain today.

Alternatives considered ​

  • A one-shot SpawnPlayer without a request. If it is lost while ServerHello arrives, the client waits forever. Rejected.
  • Spawn info on the reliable event lane. The lane's receive state resets on reconnect, so the packet would not survive the case it is needed most. Rejected.
  • Keeping money in ServerHello to restore it on reconnect. A reconnect is a new connection; restoring state through the handshake would make money an exception among the server-owned values the gamemode sets. Rejected.
  • A fixed deadline for the spawn. PreSpawn is legitimately long. Rejected in favor of a server keepalive.

Documentation licensed under CC BY 4.0. DarqlineMP is not affiliated with Rockstar Games or Take-Two Interactive. Grand Theft Auto is a trademark of Take-Two Interactive Software, Inc.