PlayerClient

getPlayerName

GET_PLAYER_NAME0x6D0DE6A7B5DA71F8

The GTA V native GET_PLAYER_NAME of the PLAYER namespace, as LS:MP client scripts call it: the global function getPlayerName, in JavaScript and in Lua.

SignatureJavaScript
getPlayerName(player: Player): string
SignatureLua
getPlayerName(player: Player): string

Usage

JavaScript
const text = getPlayerName(player);
Lua
local text = getPlayerName(player)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger

Returns

string JavaScript string, Lua string

Reference

Namespace
Player PLAYER
In the game
const char* GET_PLAYER_NAME(Player player)
Hash
0x6D0DE6A7B5DA71F8

Open in the interactive natives reference