CreatePlayerTextDraw

warning

This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions!

Description

Creates a textdraw for a single player. This can be used as a way around the global text-draw limit.

NameDescription
playeridThe ID of the player to create the textdraw for
Float:xX-Coordinate
Float:yY-Coordinate
text[]The text in the textdraw.

Returns

The ID of the created textdraw

Examples

// This variable is used to store the id of the textdraw
// so that we can use it throught the script
new PlayerText:welcomeText[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
// First, create the textdraw
welcomeText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Welcome to my SA-MP server");
// Now show it
PlayerTextDrawShow(playerid, welcomeText[playerid]);
}

Notes

tip

Player-textdraws are automatically destroyed when a player disconnects.

warning

Keyboard key mapping codes (such as ~k~~VEHICLE_ENTER_EXIT~ Doesn't work beyond 255th character.

Related Functions