01.10.2016, 01:54
(
Последний раз редактировалось RodrigoMSR; 01.10.2016 в 02:31.
)
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]);
}

