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



[Ajuda] Text Procurado Bugado - Gutierrez_zikaloko - 02.05.2012

oq tem de errado aki?
tipo quando a procura some o text de procura с some junto

pawn Код:
public OnPlayerUpdate(playerid)
{
{
    //3d
    new Text3D:procurado[MAX_PLAYERS];
    new procuradolevel = GetPlayerWantedLevel(playerid);
    new Text3d[MAX_PLAYERS];
    new gstring[70];
    if(procuradolevel > 0)
    {
        if(Text3d[playerid] == 0)
        {
            Text3d[playerid] += 1;
            format(gstring, sizeof(gstring), "Nivel de procurado: %d", GetPlayerWantedLevel(playerid) );
            procurado[playerid] = Create3DTextLabel(gstring, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
            Attach3DTextLabelToPlayer(procurado[playerid], playerid, 0.0, 0.0, 0.7);
        }
        Update3DTextLabelText(procurado[playerid], 0x008080FF, gstring ) ;
    }
    if(Text3d[playerid] += 1)
    {
        if(procuradolevel == 0)
        {
            Delete3DTextLabel(procurado[playerid]);
        }
    }
    return 1;
}



Re: {Ajuda] - KinX - 02.05.2012

Usa
GetPlayerWantedLevel
e faz um format

GetPlayerWantedLevel



Re: {Ajuda] - Gutierrez_zikaloko - 02.05.2012

aki o code:

Coloca esse Get ai pra mim fazendo favor.

pawn Код:
{
    //3d
    new Text3D:procurado[MAX_PLAYERS];
    new procuradolevel = GetPlayerWantedLevel(playerid);
    new Text3d[MAX_PLAYERS];
    if(procuradolevel > 0)
    {
        if(Text3d[playerid] == 0)
        {
            Text3d[playerid] = 1;
            procurado[playerid] = Create3DTextLabel("~x PROCURADO x~", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
            Attach3DTextLabelToPlayer(procurado[playerid], playerid, 0.0, 0.0, 0.7);
        }
        Update3DTextLabelText(procurado[playerid], 0x008080FF, "~x PROCURADO x~");
    }
    if(Text3d[playerid] == 1)
    {
        if(procuradolevel == 0)
        {
            Delete3DTextLabel(procurado[playerid]);
        }
    }
    return 1;
}



Re: {Ajuda] - KinX - 02.05.2012

Acho que achei seu erro amigo

nessa linha

pawn Код:
Delete3DTextLabel(procurado[playerid]);
troque para

pawn Код:
DeletePlayer3DTextLabel(playerid, PlayerText3D:procurado[playerid]);
Tente fazer algo parecido