Przejdź do głównej zawartości

PlayerTextDrawGetPos

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Gets the position (in-screen x & y) of a player-textdraw.

NameDescription
playeridThe ID of the player.
Playertext:textidThe ID of the player-textdraw to get the position of.
&Float:xA float variable into which to store X coordinate, passed by reference.
&Float:yA float variable into which to store Y coordinate, passed by reference.

Examples

new PlayerText:welcomeText[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
welcomeText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Welcome to my OPEN.MP server");
PlayerTextDrawShow(playerid, welcomeText[playerid]);

new Float:x, Float:y;
PlayerTextDrawGetPos(playerid, welcomeText[playerid], x, y);
// x = 320.0
// y = 240.0
}