if (PlayerInfo[playerid][pHunger] >91 && PlayerInfo[playerid][pHunger] <150 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIIIIIIIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >81 && PlayerInfo[playerid][pHunger] <90 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIIIIIIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >71 && PlayerInfo[playerid][pHunger] <80 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIIIIIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >61 && PlayerInfo[playerid][pHunger] <70 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIIIIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >51 && PlayerInfo[playerid][pHunger] <60 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIIIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >41 && PlayerInfo[playerid][pHunger] <50 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >31 && PlayerInfo[playerid][pHunger] <40 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "IIII"); //tdies
}
if (PlayerInfo[playerid][pHunger] >21 && PlayerInfo[playerid][pHunger] <30 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "III"); //tdies
}
if (PlayerInfo[playerid][pHunger] >11 && PlayerInfo[playerid][pHunger] <20 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "II"); //tdies
}
if (PlayerInfo[playerid][pHunger] >1 && PlayerInfo[playerid][pHunger] <10 )
{
PlayerTextDrawSetString(playerid, tampilan[playerid][10], "I"); //tdies
}
new new_value[17];
for (new i, j = floatround(i / 10, floatround_floor) + 1; i != j; i++) new_value[i] = 'I';
PlayerTextDrawSetString(playerid, tampilan[playerid][10], new_value);
for(new x=20; x<31;x++)
if (rangenumber == x)
{
condition work
}
Wouldn't something like this be easier?
pawn Code:
|