SA-MP Forums Archive
attach text labels - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: attach text labels (/showthread.php?tid=609827)



attach text labels - Amit1998 - 17.06.2016

Hey guys,
I'm trying to attach a 3d text label to a player by using this, however a label is not attached:
PHP код:
        PlayerTemp[playerid][pCTEXT] = Create3DTextLabel("Roulette\n($500,000 - $1,000,000)", COLOR_ORANGE, 30.0, 40.0, 50.0, 40.0, 0);
        
Attach3DTextLabelToPlayer(PlayerTemp[playerid][pCTEXT], playerid, 0.0, 0.0, 0.7); 
what could be the bug?


Re: attach text labels - oMa37 - 17.06.2016

PHP код:
new Float:x,Float:y,Float:z; // Define for the x,y,z positions
GetPlayerPos(playerid, x, y, z); // Getting the player positions

PlayerTemp[playerid][pCTEXT] = Create3DTextLabel("Roulette\n($500,000 - $1,000,000)", COLOR_ORANGE, 30.0, 40.0, 50.0, 40.0, 0); 
Attach3DTextLabelToPlayer(PlayerTemp[playerid][pCTEXT], playerid, x, y, z); // And here we attach the 3d label on the player position 



Re: attach text labels - Amit1998 - 18.06.2016

Quote:
Originally Posted by oMa37
Посмотреть сообщение
PHP код:
new Float:x,Float:y,Float:z; // Define for the x,y,z positions
GetPlayerPos(playerid, x, y, z); // Getting the player positions
PlayerTemp[playerid][pCTEXT] = Create3DTextLabel("Roulette\n($500,000 - $1,000,000)", COLOR_ORANGE, 30.0, 40.0, 50.0, 40.0, 0); 
Attach3DTextLabelToPlayer(PlayerTemp[playerid][pCTEXT], playerid, x, y, z); // And here we attach the 3d label on the player position 
didnt work, and the x y z are the offsets from the player, not his position so >:
figured out a diff solution tho