SA-MP Forums Archive
Player Names - 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: Player Names (/showthread.php?tid=283873)



Player Names - The_J0ker - 17.09.2011

Hi i am wanting to remove player name from my script but keep the id of that player above their head how would i do that


Re: Player Names - MP2 - 17.09.2011

https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
https://sampwiki.blast.hk/wiki/Create3DTextLabel


Re: Player Names - The_J0ker - 17.09.2011

Like this

pawn Код:
new Text3D:NormalLabel[MAX_PLAYERS];
OnPlayerConnect
pawn Код:
NormalLabel[playerid] = Create3DTextLabel("%d",0xF97804FF,30.0,40.0,50.0,30,-1,0, playerid);
OnPlayerSpawn
pawn Код:
Attach3DTextLabelToPlayer(NormalLabel[playerid], playerid, 0.0, 0.0, 0.5);
OnplayerDisconnect
pawn Код:
Delete3DTextLabel(NormalLabel[playerid]);



Re: Player Names - The_J0ker - 17.09.2011

Sorry double post


Re: Player Names - The_J0ker - 17.09.2011

Help


Re: Player Names - The_J0ker - 17.09.2011

ok i got it working now it just displays the "%d" and not the player id


Re: Player Names - iPLEOMAX - 17.09.2011

pawn Код:
new Text3D:NormalLabel[MAX_PLAYERS];
pawn Код:
new idtext[6]; format(idtext, sizeof idtext, "%i", playerid);
NormalLabel[playerid] = Create3DTextLabel(idtext,0xF97804FF,0,0,-100,30,-1,0);
pawn Код:
Attach3DTextLabelToPlayer(NormalLabel[playerid], playerid, 0.0, 0.0, 0.5);
pawn Код:
Delete3DTextLabel(NormalLabel[playerid]);



Re: Player Names - The_J0ker - 17.09.2011

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
pawn Код:
new Text3D:NormalLabel[MAX_PLAYERS];
pawn Код:
new idtext[6]; format(idtext, sizeof idtext, "%i", playerid);
NormalLabel[playerid] = Create3DTextLabel(idtext,0xF97804FF,0,0,-100,30,-1,0);
pawn Код:
Attach3DTextLabelToPlayer(NormalLabel[playerid], playerid, 0.0, 0.0, 0.5);
pawn Код:
Delete3DTextLabel(NormalLabel[playerid]);
It is only displaying for id 1 no other number


Re: Player Names - Tee - 17.09.2011

Let me explain what iPLEOMAX posted.

pawn Код:
new Text3D:NormalLabel[MAX_PLAYERS];//At the top of the script
pawn Код:
new idtext[6]; format(idtext, sizeof idtext, "%i", playerid);
NormalLabel[playerid] = Create3DTextLabel(idtext,0xF97804FF,0,0,-100,30,-1,0);//Put this under OnPlayerConnect
pawn Код:
Attach3DTextLabelToPlayer(NormalLabel[playerid], playerid, 0.0, 0.0, 0.5);//Put this under OnPlayerSpawn
pawn Код:
Delete3DTextLabel(NormalLabel[playerid]);//Put this under OnPlayerDisconnect