28.01.2014, 20:36
Hello, I v searched about many functions which destroy player vehicle when they leave his car by setting an timer but i wondered that if you set a timer it's will lag the server if you dont kill it how to get function which kill the timer or reduce lags iv already this in my script:
Код:
public OnPlayerExitVehicle(playerid, vehicleid) { SetTimerEx("DesVeh", 6000, 0, "i", vehicleid); return 1; } forward DesVeh(vehid); public DesVeh(vehid) { for(new i;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i)) { if(IsPlayerInVehicle(i, vehid)) return 1; } } return SetVehicleToRespawn(vehid); }