Skip to main content

CreatePlayerTextDraw

คำอธิบาย

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.

ส่งคืน

The ID of the created textdraw

ตัวอย่าง

// 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]);
}

บันทึก

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.

ฟังก์ชั่นที่เกี่ยวข้องกัน