[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


Messages In This Thread
[HELP] 3DTextLabel bug - by PolisManovic - 09.11.2017, 20:53
Re: [HELP] 3DTextLabel bug - by Kane - 10.11.2017, 00:12
Re: [HELP] 3DTextLabel bug - by PolisManovic - 10.11.2017, 10:56
Re: [HELP] 3DTextLabel bug - by PolisManovic - 11.11.2017, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)