14.05.2014, 18:45
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;
}
}