SA-MP Forums Archive
[Pedido] Mensagem em cima do nome - 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: [Pedido] Mensagem em cima do nome (/showthread.php?tid=532006)



Mensagem em cima do nome - Chery - 16.08.2014

Serб que й possнvel colocar uma mensagem em cima do nome do player, tipo o Level dele?


Re: Mensagem em cima do nome - Duun - 16.08.2014

https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer


Re: Mensagem em cima do nome - ipsLuan - 16.08.2014

pawn Код:
stock FixarTexto3D(playerid, cor, string[], {Float, _}:...)
{
    static Text3D:JogadorTexto3D[MAX_PLAYERS] = {Text3D:-1, ...};
    if(playerid == -1)  return format(string, 128, #);
    new Texto3D[128];
    new Elipse = numargs() - 3;
    new Memoria;
    new Argumentos = 4 * (3 + Elipse);
    new x = Elipse;
    #emit ADDR.pri string
    #emit STOR.S.pri Memoria
    Memoria += 4 * Elipse;
    while(x)
    {
        #emit LOAD.S.pri Memoria
        #emit LOAD.I
        #emit PUSH.pri
        Memoria -= 4;
        x--;
    }
    #emit PUSH.S string
    #emit PUSH.C 128
    #emit PUSH.ADR Texto3D
    #emit PUSH.S Argumentos
    #emit SYSREQ.C format
    while(x < Elipse + 4)
    {
        #emit POP.pri
        x++;
    }
    if(JogadorTexto3D[playerid] != Text3D:-1)   Delete3DTextLabel(JogadorTexto3D[playerid]);
    if(strlen(Texto3D))
    {
        JogadorTexto3D[playerid] = Create3DTextLabel(Texto3D, cor, 30.0, 40.0, 50.0, 3.0, 0, 0);
        Attach3DTextLabelToPlayer(JogadorTexto3D[playerid], playerid, 0.0, 0.0, 0.7);
    }
    return true;
}
Exemplo de uso:
pawn Код:
FixarTexto3D(playerid, 0xFF0000FF, "Procurado - Nнvel %d", GetPlayerWantedLevel(playerid));
Crйditos: rjjj


Re: Mensagem em cima do nome - Chery - 16.08.2014

Onde devo colocar FixarTexto3D(playerid, 0xFF0000FF, "Procurado - Nнvel %d", GetPlayerWantedLevel(playerid));


Re: Mensagem em cima do nome - ipsLuan - 16.08.2014

Basta colocar na public OnPlayerSpawn(playerid)
pawn Код:
FixarTexto3D(playerid, 0xFF0000FF, "Nнvel %d", GetPlayerScore(playerid));



Re: Mensagem em cima do nome - Chery - 18.08.2014

Estб bem pra cima, tem como abaixar nгo?


Re: Mensagem em cima do nome - Chefгo - 19.08.2014

coloca \n