Help :s
#1

Even if the vehicleid is 100 of health it sets the textdraw string to "wrecked" why?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
    {
        new Float:health;
        if(GetVehicleHealth(GetPlayerVehicleID(playerid),health) <= 100)
        {
            TextDrawSetString(Vehstate[playerid],"~g~~h~State: ~y~~h~Exellente");
        }
        if(GetVehicleHealth(GetPlayerVehicleID(playerid),health) <= 90)
        {
            TextDrawSetString(Vehstate[playerid],"~g~~h~State: ~y~~h~Good");
        }
        if(GetVehicleHealth(GetPlayerVehicleID(playerid),health) <= 40)
        {
            TextDrawSetString(Vehstate[playerid],"~g~~h~State: ~y~~h~Poor");
        }
        if(GetVehicleHealth(GetPlayerVehicleID(playerid),health) <= 10)
        {
            TextDrawSetString(Vehstate[playerid],"~g~~h~State: ~y~~h~Wrecked");
        }
        TextDrawShowForPlayer(playerid,fueltd[playerid]);
        TextDrawShowForPlayer(playerid,speedo[playerid]);
        TextDrawShowForPlayer(playerid,Vehstate[playerid]);
    }
    else
    {
        TextDrawShowForPlayer(playerid,Vehstate[playerid]);
        TextDrawHideForPlayer(playerid,fueltd[playerid]);
        TextDrawHideForPlayer(playerid,speedo[playerid]);
    }
    return 1;
}
Reply


Messages In This Thread
Help :s - by [KO]KillerThriller - 04.05.2011, 18:51
Re: Help :s - by MadeMan - 04.05.2011, 21:34
Re: Help :s - by park4bmx - 04.05.2011, 21:54

Forum Jump:


Users browsing this thread: 1 Guest(s)