Help please with auto heal.
#4

then use
pawn Код:
forward vehiclecheck(playerid, vehicleid);
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
     SetTimerEx("vehiclecheck", 500, true, "id" playerid, vehicleid);
     }
     return 1;
}

public vehiclecheck(playerid, vehicleid)
{
    new Float:vhealth;
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, vhealth);
    if(vhealth <= 100)
    {
        SetVehicleHealth(veh,1000);
     }
   return 1;
}
Reply


Messages In This Thread
Help please with auto heal. - by [A]ndrei - 20.06.2012, 20:33
Re: Help please with auto heal. - by newbienoob - 20.06.2012, 20:35
Re: Help please with auto heal. - by [A]ndrei - 20.06.2012, 20:39
Respuesta: Help please with auto heal. - by Chris1337 - 20.06.2012, 20:47
Re: Help please with auto heal. - by [A]ndrei - 20.06.2012, 20:59
Respuesta: Help please with auto heal. - by Chris1337 - 20.06.2012, 21:27
Re: Help please with auto heal. - by [A]ndrei - 20.06.2012, 21:29
Re: Help please with auto heal. - by leonardo1434 - 20.06.2012, 21:31
Re: Help please with auto heal. - by [A]ndrei - 20.06.2012, 21:41
Re: Help please with auto heal. - by [MM]RoXoR[FS] - 29.06.2012, 04:25

Forum Jump:


Users browsing this thread: 1 Guest(s)