Timer help!
#8

Quote:
Originally Posted by nickbouwhuis
Посмотреть сообщение
Aww yeah! It works! What happens if a user gets back in the car in that minute? Will the car still disappear?

--EDIT--
Tested, car will disappear, can you also build in that that doesn't happen? Would be greatly apriciatied!
Well try killing timer onplayerentervehicle, that should work i think.

E.g.

pawn Код:
new myTimer;

public OnPlayerExitVehicle(playerid, vehicleid)
{
    myTimer = SetTimerEx("ResetCar", 60000, 0,"d", vehicleid);
}
forward ResetCar(vehicleid);
public ResetCar(vehicleid)
{
    DestroyVehicle(vehicleid);
    return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    KillTimer(myTimer);
    return 1;
}
Reply


Messages In This Thread
Timer help! - by nickbouwhuis - 02.10.2012, 16:36
Re: Timer help! - by gtakillerIV - 02.10.2012, 16:38
Re: Timer help! - by nickbouwhuis - 02.10.2012, 17:06
Re: Timer help! - by Djole1337 - 02.10.2012, 17:11
Re: Timer help! - by nickbouwhuis - 02.10.2012, 17:34
Re: Timer help! - by gtakillerIV - 02.10.2012, 17:46
Re: Timer help! - by RedFusion - 02.10.2012, 17:50
Re: Timer help! - by Djole1337 - 02.10.2012, 17:52
Re: Timer help! - by RedFusion - 02.10.2012, 18:04
Re: Timer help! - by nickbouwhuis - 03.10.2012, 06:07

Forum Jump:


Users browsing this thread: 2 Guest(s)