Quote:
Originally Posted by No Fear
pawn Код:
if ( TVar[ playerid ][ tBattery ] <= 100 ) { format( Battery, sizeof( Battery ),"|||||");} else if ( TVar[ playerid ][ tBattery ] <= 75 ) { format( Battery, sizeof( Battery ),"||||");} else if ( TVar[ playerid ][ tBattery ] <= 50 ) { format( Battery, sizeof( Battery ),"|||" );} else if ( TVar[ playerid ][ tBattery ] <= 25 ) { format( Battery, sizeof( Battery ),"||" );} else if ( TVar[ playerid ][ tBattery ] <= 0 ) { format( Battery, sizeof( Battery ),"|" );}
whats wrong it's showing 5 bars, even if i have 0 battery
|
pawn Код:
switch(Tvar[playerid][tBattery])
{
case 100: format(Battery, sizeof(Battery),"|||||");
case 75..99: format(Battery, sizeof(Battery),"||||");
case 50..74: format(Battery, sizeof(Battery),"|||");
case 25..49: format(Battery, sizeof(Battery),"||");
case 0..24: format(Battery, sizeof(Battery),"|");
}
Could try that out