Skip to content

Function; Player_GetName

Novaras edited this page Nov 1, 2022 · 2 revisions

Player_GetName(<player_index>)

Description

Returns a userdata type, which is presumably a wchar_t* string.

Wide char userdata is only usable with certain other stock functions:

It appears that there is no way to convert this data into a normal Lua string.

Arguments

Param Type Description
player_index number The index of the player who's wchar name we want. Player 0 is always the 'human' player, or the host in the case of a multiplayer game.

Example

local player_name_wchar = Player_GetName(0);
Subtitle_Messagew(player_name_wchar, 5);

Related Pages

Clone this wiki locally