Player Names
#1

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
Reply
#2

https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
https://sampwiki.blast.hk/wiki/Create3DTextLabel
Reply
#3

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]);
Reply
#4

Sorry double post
Reply
#5

Help
Reply
#6

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

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]);
Reply
#8

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
Reply
#9

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)