03.11.2011, 20:04
pawn Код:
public LabelStreamUpdate()
{
for(new i, f = GetMaxPlayers(); i < f; i++)
{
if(IsPlayerConnected(i))
{
for(new j, k = LabelsCreated; j < k; j++)
{
if(IsPlayerInRangeOfPoint(i,LInfo[j][Distance],LInfo[j][XPos],LInfo[j][YPos],LInfo[j][ZPos]))
{
if(LInfo[j][IsLabelCreated] == 1) continue;
LInfo[j][Label] = Create3DTextLabel(LabelText[i],LInfo[j][Color],LInfo[j][XPos],LInfo[j][YPos],LInfo[j][ZPos],LInfo[j][Distance],LInfo[j][VirtualWorld],LInfo[j][TestLOS]);
LInfo[j][IsLabelCreated] = 1;
}
if(LInfo[j][IsLabelCreated] == 1 && !IsPlayerInRangeOfPoint(i,LInfo[j][Distance],LInfo[j][XPos],LInfo[j][YPos],LInfo[j][ZPos]))
{
Delete3DTextLabel(LInfo[j][Label]);
LInfo[j][IsLabelCreated] = 0;
}
}
}
else continue;
}
return 1;
}