[Ajuda] 3D Text Label
#1

Tenho um problema nas 3d textlabel:

pawn Код:
new Text3D:PingFPS[MAX_PLAYERS];
new Text3D:DamageHP[MAX_PLAYERS];

//Onplayerconnect
Delete3DTextLabel(PingFPS[playerid]);
Delete3DTextLabel(DamageHP[playerid]);

PingFPS[playerid] = Create3DTextLabel("_", 0x00FF00FF, 0, 0, 0, 25, 0, true);
Attach3DTextLabelToPlayer(PingFPS[playerid], playerid, 0.0, 0.0, -0.745);

DamageHP[playerid] = Create3DTextLabel(" ", -1, 0, 0, 0, 40.0, 0, true);
Attach3DTextLabelToPlayer(DamageHP[playerid], playerid, 0.0,0.0, 0.8);

//Public de atualizar o player
new iString[80];
    format(iString, sizeof(iString), "{FFA500}Ping: {FFFFFF}%i\n{FFA500}FPS: {FFFFFF}%i",GetPlayerPing(playerid), pFPS[playerid]);
    Update3DTextLabelText(PingFPS[playerid], 0x00FF00FF, iString);
//----------------------------
forward Esconder3DHP(playerid);
public Esconder3DHP(playerid)
{
    UpdateDynamic3DTextLabelText(DamageHP[playerid], 0x00FF00FF, " ");
    return 1;
}
//onplayertakedamage
new STR[126];
format(STR,sizeof(STR),"{FFFFFF}%s {FFFFFF}-%.0f hp {FF8000}(%s)",GetName(issuerid), LastDamageShoot[playerid], WeaponName(weaponid));
        Update3DTextLabelText(DamageHP[playerid], 0x00FF00FF, STR);
        SetTimerEx("Esconder3DHP", 2000, false, "i", playerid);
Mas nao percebo, as 3d de ping e damage as vezes confundem o ping fica no lugar da do damage e vice-versa.. e as vezes fica duas vezes as mesmas 3d uma por cima da outra..
Reply
#2

BUMP
Reply
#3

Estranho pelo cуdigo parece-me estar tudo correto, jб tentaste fazer um debug?
Reply
#4

Como assim ?
Reply
#5

Fazer um Debug pra ver se a funзгo estб sendo executada. Sгo vбrias as maneiras de fazer Debug (mensagem, console, executando uma callback)

Exemplo: Clique aqui
Reply
#6

pawn Код:
new numr[50];
    PingFPS[playerid] = Create3DTextLabel("_", 0x00FF00FF, 0, 0, 0, 25.0, 0, 0);
    format(numr, 50, "Criar PingFPS, id: %d", PingFPS[playerid]);
    Debug(numr);
    if(Attach3DTextLabelToPlayer(PingFPS[playerid], playerid, 0.0, 0.0, -0.745))
        Debug("Attach PingFPS");

    DamageHP[playerid] = Create3DTextLabel(" ", -1, 0, 0, 0, 60.0, 0, 0);
    format(numr, 50, "Criar DamageHP, id: %i", DamageHP[playerid]);
    Debug(numr);
    if(Attach3DTextLabelToPlayer(DamageHP[playerid], playerid, 0.0,0.0, 0.8))
        Debug("Attach DamageHp");

//==================================
stock Debug(texto[])
{
    format(texto, 60, "%s\n",texto);
    new File:hFile;
    hFile = fopen("debug.txt", io_append);
    fwrite(hFile, texto);
    fclose(hFile);
}
Mas da tag mismtach no format..
E como diz na wiki ele retorana o id do objetoo..

@EDIT:

Код:
Apagar PingFPS

Criar PingFPS, id: 0

Attach PingFPS

Criar DamageHP, id: 171

Attach DamageHp
Como й possivel o pingfps criar um 3dtext id 0 ? se existem mais antes ?
Reply
#7

Bump
Reply
#8

BUMP
Reply
#9

BUMP 2

(desculpem o 4post mas nao estou a conseguir resolver...)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)