[HELP]GetVehicleHealth
#3

Sorry .. I made a mistake.

#EDIT

Code fixed:
PHP код:
forward VehicleTimer(playerid);
public 
VehicleTimer(playerid)
{
    if(
IsPlayerInAnyVehicle(playerid))
    {
        new 
healthstring[128];
        new 
Float:health;
        new 
vehicleid GetPlayerVehicleID(playerid);
        
GetVehicleHealth(vehicleidhealth);
        if(
health >= 750 && health <= 1000format(healthstringsizeof(healthstring), "~w~Heatlh: ~g~h~%d"vehhealth);
        else if(
health >= 749 && health <= 500format(healthstringsizeof(healthstring), "~w~Health: ~y~~h~%d"vehhealth);
        else if(
health >= 250 && health <= 499format(healthstringsizeof(healthstring), "~w~Health: ~r~~h~%d"vehhealth);
        else if(
health >= && health <= 249format(healthstringsizeof(healthstring), "~w~Health: ~r~~h~TOTALED");
        
TextDrawSetString(HealthText[playerid], healthstring);
        new 
speedstring[128];
           new 
kmh GetPlayerSpeed(playeridtrue);
        if(
kmh >= && kmh <= 80format(speedstringsizeof(speedstring), "~w~Speed: ~g~~h~%d ~w~KM/h."kmh);
        else if(
kmh >= 81 && kmh <= 120format(speedstringsizeof(speedstring), "~w~Speed: ~y~~h~%d ~w~KM/h."kmh);
        else if(
kmh >= 121format(speedstringsizeof(speedstring), "~w~Speed: ~r~~h~%d ~w~KM/h."kmh);
        
TextDrawSetString(SpeedoText[playerid], speedstring);
     }
    return 
1;

Reply


Messages In This Thread
[HELP]GetVehicleHealth - by PCheriyan007 - 13.07.2011, 02:50
Re: [HELP]GetVehicleHealth - by PrawkC - 13.07.2011, 02:57
Re: [HELP]GetVehicleHealth - by Shadoww5 - 13.07.2011, 02:59
Re: [HELP]GetVehicleHealth - by Daren_Jacobson - 13.07.2011, 03:03

Forum Jump:


Users browsing this thread: 1 Guest(s)