codition
#1

i create condition for hunger update every 5 second . but text just cange if value 100 and <0 this my code.
PHP Code:
if (PlayerInfo[playerid][pHunger] >91 && PlayerInfo[playerid][pHunger] <150 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIIIIIIIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >81 && PlayerInfo[playerid][pHunger] <90 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIIIIIIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >71 && PlayerInfo[playerid][pHunger] <80 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIIIIIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >61 && PlayerInfo[playerid][pHunger] <70 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIIIIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >51 && PlayerInfo[playerid][pHunger] <60 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIIIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >41 && PlayerInfo[playerid][pHunger] <50 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >31 && PlayerInfo[playerid][pHunger] <40 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "IIII"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >21 && PlayerInfo[playerid][pHunger] <30 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "III"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >11 && PlayerInfo[playerid][pHunger] <20 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "II"); //tdies
    
}
    if (
PlayerInfo[playerid][pHunger] >&& PlayerInfo[playerid][pHunger] <10 )
    {
        
PlayerTextDrawSetString(playeridtampilan[playerid][10], "I"); //tdies
    

how to check range for example 1 to 10 = a, 11 to 20 = b, etc?
Reply


Messages In This Thread
codition - by ratxrat - 20.05.2016, 15:59
Re: codition - by luke49 - 20.05.2016, 16:06
Re: codition - by ratxrat - 20.05.2016, 16:08
Re: codition - by Naruto_Emilio - 20.05.2016, 16:32
Re: codition - by ratxrat - 20.05.2016, 16:58
Re: codition - by Konstantinos - 20.05.2016, 17:00
Re: codition - by ratxrat - 20.05.2016, 17:21
Re: codition - by ratxrat - 20.05.2016, 17:27

Forum Jump:


Users browsing this thread: 2 Guest(s)