[Ajuda] Textdraw Box Color
#5

Alterei algumas coisas e funcionou perfeitamente:
Код:
forward t(playerid);
public t(playerid)
{
    new
        Float:Vida
    ;
    GetVehicleHealth(GetPlayerVehicleID(playerid), Vida);
    new
        Float:Progresso = (((Vida - 300.0) / 700.0) * 100.0),
        Float:Progresso2 = ((Vida / 100.0) * 100.0),
        cor = 0xFF0000FF
    ;
    if(Progresso >= 1.0)
        cor = GetGradientColor(0xFF0000FF,  0x00FF00FF, 1000, floatround(Progresso2));
    else
        Progresso = 0.0;
    PlayerTextDrawHide(playerid, bar[playerid][1]);
    PlayerTextDrawHide(playerid, bar[playerid][2]);
    new string[128];
    format(string, sizeof(string), "Progresso: %d Cor: 0x%x-0x%x", floatround(Progresso2), cor, (0x77 | (~0xFF & cor)));
    SendClientMessage(playerid, -1, string);
    PlayerTextDrawBoxColor(playerid, bar[playerid][1], (0x77 | (~0xFF & cor)));
    PlayerTextDrawBoxColor(playerid, bar[playerid][2], cor);
    PlayerTextDrawTextSize(playerid, bar[playerid][2], (486.500000 + ((94.00000 * Progresso) / 100)), 0.0);
    PlayerTextDrawShow(playerid, bar[playerid][1]);
    PlayerTextDrawShow(playerid, bar[playerid][2]);
}
Reply


Messages In This Thread
Textdraw Box Color - by Dayvison_ - 30.09.2016, 16:02
Re: Textdraw Box Color - by RedMF - 30.09.2016, 21:43
Re: Textdraw Box Color - by Carlos001 - 30.09.2016, 21:56
Re: Textdraw Box Color - by Dayvison_ - 30.09.2016, 21:59
Re: Textdraw Box Color - by RodrigoMSR - 01.10.2016, 01:54
Re: Textdraw Box Color - by Dayvison_ - 01.10.2016, 21:09

Forum Jump:


Users browsing this thread: 1 Guest(s)