vehicle fix
#5

GetVehicleHealth does not return any values. The value is stored in 'health' variable. And RepairVehicle takes the car as parameter, not the player
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new playerState = GetPlayerState(playerid);
    if(playerState == PLAYER_STATE_DRIVER)
    {
        new Float: health;
        new veh;
        veh = GetPlayerVehicleID(playerid);
        GetVehicleHealth(veh,health);
        if(health < 1000)
        {
            RepairVehicle(veh);
        }
    }
    return 1;
}
Reply


Messages In This Thread
vehicle fix - by R4VER - 12.09.2012, 06:35
Re: vehicle fix - by clarencecuzz - 12.09.2012, 06:43
Re: vehicle fix - by R4VER - 12.09.2012, 08:15
Re: vehicle fix - by R4VER - 12.09.2012, 08:19
Respuesta: vehicle fix - by Siralos - 12.09.2012, 08:22
Re: vehicle fix - by [ABK]Antonio - 12.09.2012, 08:58

Forum Jump:


Users browsing this thread: 1 Guest(s)