SA-MP Forums Archive
[Ajuda] Attach3DTextLabelToPlayer - 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] Attach3DTextLabelToPlayer (/showthread.php?tid=438068)



Attach3DTextLabelToPlayer - Stronda xD - 18.05.2013

Bom, eu fiz um Texto3d para quem estiver procurado no servidor, ele й posicionado acima do nick de quem й procurado.

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(WantedPoints[i] > 0 && WantedPoints[i] != 1337)
        {
            Delete3DTextLabel(Procurado[i]);
            format(string, sizeof(string), "** Procurado **\nNнvel: %d",WantedPoints[i]);
            Procurado[i] = Create3DTextLabel(string,0x33ccffFF,0.0, 0.0, 0.0, 15.0, 0, 0);
            Attach3DTextLabelToPlayer(Procurado[i], i, 0.0, 0.0, 0.7);
        }
    }
}
Mais queria definir para apenas os Policiais poderem ver isto, tem alguma forma?


Re: Attach3DTextLabelToPlayer - AlucardSnow - 18.05.2013

Faz isso:

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
     if(VariavelDePolicial(i))
     {
        if(WantedPoints[i] > 0 && WantedPoints[i] != 1337)
        {
            Delete3DTextLabel(Procurado[i]);
            format(string, sizeof(string), "** Procurado **\nNнvel: %d",WantedPoints[i]);
            Procurado[i] = Create3DTextLabel(string,0x33ccffFF,0.0, 0.0, 0.0, 15.0, 0, 0);
            Attach3DTextLabelToPlayer(Procurado[i], i, 0.0, 0.0, 0.7);
        }
     }  
     }
}
Em VariavelDePolicial coloque sua variavel, simples.