[HELP] 3DTextLabel bug
#1

Hello, I have a problem with my script for viewing HP, Names in the 3DLabel is just a problem that if I join, I often blinks the label just above one player.
Above one player, 10 names are displayed within a few seconds.

This code:
Код:
new Text3D:playerstatuslabel[MAX_PLAYERS];
This use only Disconnect and Connect
Код:
Delete3DTextLabel(playerstatuslabel[playerid]);
KillTimer(playertm[playerid]);
Код:
stock StartPlayerStatus(playerid)   // this use only login and register
{
playerstatuslabel[playerid] = Create3DTextLabel("[ Loading ]", 0x008080FF, 30.0, 40.0, 50.0,5.0, 0);
Attach3DTextLabelToPlayer(playerstatuslabel[playerid], playerid, 0.0, 0.0, 0.5);
playertm[playerid] = SetTimerEx("PlayerLabel",700, true, "i", playerid);
return 1;
}
Timer
Код:
 

forward PlayerLabel(playerid);
public PlayerLabel(playerid)
{
UpdatePlayerStatus(playerid);
return 1;
}
Update status
Код:
stock UpdatePlayerStatus(playerid)
{
new str[200],lbl[100];
format(lbl,sizeof(lbl),"[ %s ]\n",GetName(playerid));
strcat(str,lbl);
if(PlayerInfo[playerid][pVesta] > 0)
{
format(lbl,sizeof(lbl)," HP:%d || AR:%d\n\n",floatround(PlayerInfo[playerid][pHP]),floatround(PlayerInfo[playerid][pVesta]));
strcat(str,lbl);
}
else if(PlayerInfo[playerid][pVesta] <= 0)
{
format(lbl,sizeof(lbl)," HP:%d\n\n",floatround(PlayerInfo[playerid][pHP]));
strcat(str,lbl);
}
if(deathmode[playerid] == 1)
{
format(lbl,sizeof(lbl),"[ DEATHMODE ]");
strcat(str,lbl);
}
else if(deathmode[playerid] == 0)
{
format(lbl,sizeof(lbl),"");
strcat(str,lbl);
}
Update3DTextLabelText(playerstatuslabel[playerid],0xFFFFFFFF,str);
return 1;
}
This has never happened to me as displaying the text just above one player, meaning that there will be ten names.
Reply
#2

Can you show a screenshot of what you mean?
Reply
#3

Quote:
Originally Posted by Arthur Kane
Посмотреть сообщение
Can you show a screenshot of what you mean?
Yeah this watch to playername

This character has the names of all players on the server.
My character has no label over it.

[spoiler]



[/spoiler]
Reply
#4

On screenshots is time 700ms beetween screenshots
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)