progress bar doesnt disappear
#1

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
Reply
#2

Show us your code script
Reply
#3

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;
}
Reply
#4

Try the following

PHP код:
OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER)
    {
        
ShowProgressBarForPlayer(playeridVehicleBar[playerid]);
        
SetProgressBarValue(VehicleBar[playerid],100);
        
UpdateProgressBar(VehicleBar[playerid]);
        return 
1;
    }
    if((
oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
    {
        
HideProgressBarForPlayer(playeridVehicleBar[playerid]);
        return 
1;
    }

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)