[Ajuda] Code - 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] Code (
/showthread.php?tid=401654)
Code -
mau.tito - 23.12.2012
Galera to fazendo um velocimetro em ps mas ele nao diminui a barra!
Nenhum dos dois abaixa ¬¬
CODE
pawn Код:
forward AtualizarVelocimetro(playerid);
public AtualizarVelocimetro(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:Lataria;
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, Lataria);
Gas[vehicleid] -= 1;
SetProgressBarValue(Bar1, Gas[vehicleid]);
SetProgressBarValue(Bar2, Lataria);
SetProgressBarColor (Bar1, 0x00FF00AA);
SetProgressBarColor (Bar2, 0xFF0000AA);
UpdateProgressBar(Bar1, playerid = INVALID_PLAYER_ID);
UpdateProgressBar(Bar2, playerid = INVALID_PLAYER_ID);
}
return true;
}
Re: Code -
JonathanFeitosa - 23.12.2012
pawn Код:
// use !
SetProgressBarValue(Bar1, Gas[vehicleid]);
// e faltou o
UpdateProgressBar(Bar2, playerid = INVALID_PLAYER_ID);
Re: Code -
mau.tito - 23.12.2012
Quote:
Originally Posted by Jonathan_Feitosa
pawn Код:
// use ! SetProgressBarValue(Bar1, Gas[vehicleid]); // e faltou o UpdateProgressBar(Bar2, playerid = INVALID_PLAYER_ID);
|
Fiz do geito que voce flo mas nao funcionou a barra nem se meche!