Ugrás a fő tartalomhoz

CreatePlayerTextDraw

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
const format[]The text in the textdraw.
OPEN_MP_TAGS:...Indefinite number of arguments of any tag.

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 OPEN.MP server");

// Now show it
PlayerTextDrawShow(playerid, welcomeText[playerid]);
return 1;
}

Notes

tanács

Player-textdraws are automatically destroyed when a player disconnects.

vigyázat

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