[AJUDA] Labels - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Labels (
/showthread.php?tid=294870)
[AJUDA] Labels -
FireCat - 03.11.2011
Mesmo que o jogador esteja em range of point, faz delete do label, alguem sabe porque?
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;
}
else 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;
}
Re: [AJUDA] Labels -
[O.z]Caroline - 03.11.2011
Wrong code.
pawn Код:
public LabelStreamUpdate()
{
for(new i, f = GetMaxPlayers(); i != f; i++)
{
if(IsPlayerConnected(i))
{
for(new j; j != LabelsCreated; j++)
{
if(IsPlayerInRangeOfPoint(i,LInfo[j][Distance],LInfo[j][XPos],LInfo[j][YPos],LInfo[j][ZPos]))
{
if(LInfo[j][IsLabelCreated] != 1)
{
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;
}
}
}
}
return 1;
}
Re: [AJUDA] Labels -
SlashPT - 03.11.2011
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;
}