Passa al contenuto principale

DeletePlayer3DTextLabel

Description

Destroy a 3D text label that was created using CreatePlayer3DTextLabel.

NameDescription
playeridThe ID of the player whose 3D text label to delete.
PlayerText3D:textidThe ID of the player's 3D text label to delete.

Returns

true - The function executed successfully.

false - The function failed to execute. This means the label specified doesn't exist.

Examples

new PlayerText3D:playerTextId[MAX_PLAYERS];

public OnPlayerSpawn(playerid)
{
new
name[MAX_PLAYER_NAME],
Float:x, Float:y, Float:z,
string[64];

GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, x, y, z);

format(string, sizeof(string), "Hello %s!\nI'm at your position", name);
playerTextId[playerid] = CreatePlayer3DTextLabel(playerid, string, 0x008080FF, x, y, z, 40.0);
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
DeletePlayer3DTextLabel(playerid, playerTextId[playerid]);
return 1;
}