跳到主要内容

GetPlayer3DTextLabelPos

注意

这个函数是在omp v1.1.0.2612中添加的,在以前的版本中不起作用!

描述

获取玩家 3D 文本标签的位置。

名称描述
playerid玩家的 ID
PlayerText3D:textid需要获取位置的玩家 3D 文本标签 ID
&Float:x存储 X 坐标的浮点变量,通过引用传递
&Float:y存储 Y 坐标的浮点变量,通过引用传递
&Float:z存储 Z 坐标的浮点变量,通过引用传递

示例代码

new PlayerText3D:playerTextId;
new Float:playerX, Float:playerY, Float:playerZ;

GetPlayerPos(playerid, playerX, playerY, playerZ);
playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, playerX, playerY, playerZ, 40.0);

new Float:x, Float:y, Float:z;
GetPlayer3DTextLabelPos(playerid, playerTextId, x, y, z);

相关函数