13.04.2010, 20:55
Hey guys,
I have this idea, that when a vehicles health goes under 350, then a timer starts and after 10 minutes, the vehicle will be placed at another position.
However, if the vehicles health goes above 350, the timer shouldn't affect this car anylonger.
Ofcourse it should be working seperately with every car, so that it won't bug any other cars, but the one that just went just under 350 health.
I have this so far, but i'm not quite sure of how to actually get it to work with the timer.
I am aware that the killtimer will completely remove the timer, but do You have any idea of how i could get this to work?
Also, i havn't yet made a timer yet. I could use your assistance in this one.
Much appreciated. Thanks.
I have this idea, that when a vehicles health goes under 350, then a timer starts and after 10 minutes, the vehicle will be placed at another position.
However, if the vehicles health goes above 350, the timer shouldn't affect this car anylonger.
Ofcourse it should be working seperately with every car, so that it won't bug any other cars, but the one that just went just under 350 health.
I have this so far, but i'm not quite sure of how to actually get it to work with the timer.
Код:
public Scrap(playerid, vehicleid) { if(vehhealth > 349){ KillTimer(ScrapTimer); }else{ if(vehhealth <= 349){ new r = random(MAX_RANDOM_POSITIONS-1); vehicleid = GetPlayerVehicleID(playerid); SetVehiclePos(vehicleid, rPos[r][0], rPos[r][1], rPos[r][2]); KillTimer(ScrapTimer); }
Also, i havn't yet made a timer yet. I could use your assistance in this one.
Much appreciated. Thanks.