[Ajuda] Attach3DTextLabelToPlayer
#1

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?
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)