[Pedido] Mensagem em cima do nome
#1

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

https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Reply
#3

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
Reply
#4

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

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

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

coloca \n
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)