GetPlayerBody

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 18:59, 15 August 2026 by QCherry (talk | contribs) (Document player skin, body and head appearance API)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getPlayerBody

Returns a player's authoritative full-body identity preset.

Syntax

string|false getPlayerBody(int playerId)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.

Returns

Returns the stable body key, or false when the player is invalid or appearance state is unavailable.

Examples

Read a player's body preset:

local bodyKey = getPlayerBody(playerId)
if bodyKey then
    outputDebugString("Body: " .. bodyKey)
end

Notes

  • Available only in server-side resource scripts.
  • The returned state is server-authoritative and late-join safe.