SA-MP Forums Archive
Timeout - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Timeout (/showthread.php?tid=156902)



Timeout - martin149 - 24.06.2010

how do i make a timeout before i destroy the vehicle:
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
DestroyVehicle(vehicleid);
}



Re: Timeout - Conroy - 24.06.2010

pawn Код:
#define VEHICLE_TIMEOUT 5 //Number of seconds before the vehicle is destroyed

forward VehicleTimeout(vehid);
pawn Код:
//OnPlayerExitVehicle
SetTimerEx("VehicleTimeout", VEHICLE_TIMEOUT * 1000, false, "d", vehicleid);
pawn Код:
public VehicleTimeout(vehid)
{
DestroyVehicle(vehid);
return 1;
}