progress bar doesnt disappear - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: progress bar doesnt disappear (
/showthread.php?tid=513143)
progress bar doesnt disappear -
iBots - 14.05.2014
i have made a progress bar for vehicle it dicreases when you click on lmb and increases when you release,but if i leave the vehicle while it's loading it doesnt get hidden,and if it's full it gets hidden,how could i fix it?i am using on player exit vehicle it hides the progress bar..,but still
Re : progress bar doesnt disappear -
yusei - 14.05.2014
Show us your code script
Re: progress bar doesnt disappear -
iBots - 14.05.2014
pawn Код:
OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
ShowProgressBarForPlayer(playerid, VehicleBar[playerid]);
SetProgressBarValue(VehicleBar[playerid],100);
UpdateProgressBar(VehicleBar[playerid]);
return 1;
}
}
and
pawn Код:
OnPlayerExitVehicle(playerid)
{
HideProgressBarForPlayer(playerid, VehicleBar[playerid]);
return 1;
}
Re : progress bar doesnt disappear -
yusei - 14.05.2014
Try the following
PHP код:
OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
ShowProgressBarForPlayer(playerid, VehicleBar[playerid]);
SetProgressBarValue(VehicleBar[playerid],100);
UpdateProgressBar(VehicleBar[playerid]);
return 1;
}
if((oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
HideProgressBarForPlayer(playerid, VehicleBar[playerid]);
return 1;
}
}