12.03.2015, 12:19
Use SetTimerEx.
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER) SetTimerEx("TimerName", 120000, false, "i", vehicleid);
// Set a timer of 120.000 milliseconds (2 minutes)
// "false" to be non-repeating
// Passes on the vehicleid as an integer
return 1;
}
pawn Код:
forward TimerName(vehicleid);
public TimerName(vehicleid) DestroyVehicle(vehicleid);
// When the timer is done, it executes the function in the public, which in this case is DestroyVehicle