12.09.2012, 08:22
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;
}