Help Scripts . Error NameTags Player !!
#1

Help me
Reply
#2

Provide code and we can try to help you
Reply
#3

format(string,sizeof(string),"%s (%d)",playerName,playerid);
PlayerNames[11][playerid] = Create3DTextLabel(string, 0xFFFFFFFF, 0, 0, 0, NAME_DRAWDISTANCE, 0, 1 );
Attach3DTextLabelToPlayer(PlayerNames[11][playerid], playerid, 0.0, 0.0, 0.2);
Update3DTextLabelText(PlayerNames[11][playerid], 0xFFFFFFFF, string);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
Reply
#4

Code:
CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer, attachedvehicle, testLOS)
Code:
Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
https://sampwiki.blast.hk/wiki/CreatePlayer3DTextLabel

You should be using this instead of Create3DTextLabel and you need to change the Z axis (if i'm not wrong) to make the text show above your name
Reply
#5

If you read his code Flamehaze7, he's already got that...

You need to disable the player nametags, before trying to do something like this.
Reply
#6

Quote:
Originally Posted by Sew_Sumi
View Post
You need to disable the player nametags, before trying to do something like this.
like he said, u need to remove default nametags, u can do it with ShowNameTags(0); by placing it in OnGameModeInIt

also make sure when player disconnects, this 3dtextlabel is removed.
Reply
#7

And if you using this in a cmd like mask you can just put this ShowNameTags(0); in the cmd aswell.
Reply
#8

Quote:
Originally Posted by N0FeaR
View Post
And if you using this in a cmd like mask you can just put this ShowNameTags(0); in the cmd aswell.
this will disable whole server's name tags, use this - ShowPlayerNameTagForPlayer (https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer)
Reply
#9

Quote:
Originally Posted by Mugalito
View Post
this will disable whole server's name tags, use this - ShowPlayerNameTagForPlayer (https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer)
Yeah i just realize that thanks for correct me.
Reply
#10

Quote:
Originally Posted by N0FeaR
View Post
And if you using this in a cmd like mask you can just put this ShowNameTags(0); in the cmd aswell.
Incorrect.

Quote:

This function can only be used in OnGameModeInit. For other times, see ShowPlayerNameTagForPlayer.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)