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_ORANGE30.040.050.040.00);
        
Attach3DTextLabelToPlayer(PlayerTemp[playerid][pCTEXT], playerid0.00.00.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(playeridxyz); // Getting the player positions

PlayerTemp[playerid][pCTEXT] = Create3DTextLabel("Roulette\n($500,000 - $1,000,000)"COLOR_ORANGE30.040.050.040.00); 
Attach3DTextLabelToPlayer(PlayerTemp[playerid][pCTEXT], playeridxyz); // 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(playeridxyz); // Getting the player positions
PlayerTemp[playerid][pCTEXT] = Create3DTextLabel("Roulette\n($500,000 - $1,000,000)"COLOR_ORANGE30.040.050.040.00); 
Attach3DTextLabelToPlayer(PlayerTemp[playerid][pCTEXT], playeridxyz); // 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