SA-MP Forums Archive
[Ajuda] Velocimetro em 3D - 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] Velocimetro em 3D (/showthread.php?tid=456906)



Velocimetro em 3D - Em3rsoN - 08.08.2013

Gente to com um problema no velocimetro eu queria deixa ele em 3d mais nгo consigo, quando saio do carro o texto nгo some
pawn Код:
if(MostrarVelocimetro[i] == 1)
        {
            if(IsPlayerInAnyVehicle(i))
            {
                new speed = GetPlayerSpeed(i,true);
                format(String ,16, "~r~km/h ~w~%d", speed);
                if(!speed || speed < 0)
                {
                    Velocimetro[i] = Create3DTextLabel(String, -1, 0.0, 0.0, 0.0, 50.0, 0, 1);
                    Attach3DTextLabelToVehicle(Velocimetro[i], VeiculoID[i], 0.0, 0.0, 0.0+1);
                }
                Update3DTextLabelText(Velocimetro[i], -1, String);
            }
        }
        else
        {
            return Update3DTextLabelText(Velocimetro[i], -1, " ");
        }



Re: Velocimetro em 3D - [A]rray - 08.08.2013

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    //Aqui coloque o loop
    if(MostrarVelocimetro[i] == 1)
        return DeletePlayer3DTextLabel(i, Velocimetro[i]);

    return true;
}



Re: Velocimetro em 3D - [THs]ShadoW - 08.08.2013

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

Tenta usar isso na OnPlayerExitVehicle


Re: Velocimetro em 3D - P1c4550 - 08.08.2013

OnPlayerExitVehicle buga bastante pode ser que quando estive em uma moto e o player
caia dela o velocimetro nao saia da tela

eu aconselho na OnPlayerStateChange ficando assim \/
PHP код:
    if(oldstate == PLAYER_STATE_DRIVER)
       {
            
//show
    
}
        else
        {
           
//hide