All pastes #1611950 Raw Edit

Untitled

public text v1 · immutable
#1611950 ·published 2009-10-11 08:37 UTC
rendered paste body
----------
UNDER OnPlayerConnect: 
----------
SetTimerEx("AutoRepair",500,true,"d",playerid);
----------
Put this at the end of the script:
----------
forward AutoRepair(playerid);
public AutoRepair(playerid)
{
    if (IsPlayerInAnyVehicle(playerid))
    {
        new Float:health,
              vehicleid;
        vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleHealth(vehicleid, health);
	if (health < 250)
        {
            SetVehicleHealth(vehicleid,1000);
	    GameTextForPlayer(playerid,"~n~~n~~g~Your vehicle has automatically been repaired!",1000,3);
	}
    }
}
----------