GetPlayerIdentity: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document Protocol 23 voice and player presentation APIs
 
Document 0.1a Lua API, identities, moderation and synchronized spells
Line 1: Line 1:
<!-- This page is generated automatically from the function definition: getPlayerIdentity. -->
= getPlayerIdentity =
= getPlayerIdentity =
Returns the player's complete identity when its face and identity layers use the same key.
Returns the player's complete identity when its face and identity layers use the same key.
Line 30: Line 29:
* Available only in server-side resource scripts.
* Available only in server-side resource scripts.
* The returned state is server-authoritative and late-join safe.
* The returned state is server-authoritative and late-join safe.
* Some identity profiles still have compatibility issues with specific armor assets.
* Gothic Remake character variants have identity-specific armor support; not every identity/armor combination exists or renders correctly.


[[Category:Lua Functions]]
[[Category:Lua Functions]]

Revision as of 11:36, 27 August 2026

getPlayerIdentity

Returns the player's complete identity when its face and identity layers use the same key.

Syntax

string|false getPlayerIdentity(int playerId)

Parameters

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

Returns

Returns the stable identity key, or false when the player is invalid or the advanced face and head layers were intentionally mixed.

Examples

Read the current complete identity:

local identityKey = getPlayerIdentity(playerId)
if identityKey then
    outputDebugString("Identity: " .. identityKey)
end

Notes

  • Available only in server-side resource scripts.
  • The returned state is server-authoritative and late-join safe.
  • Gothic Remake character variants have identity-specific armor support; not every identity/armor combination exists or renders correctly.