08.02.2014, 10:14
Hello, iv this function
Which destroy the vehicle after 1 min from leave, anyway many people saied that this will cause a lagg when i v more players , any good ideas how to destroy vehicle after 1 min ? , i was thinking to make a timer in GameModeInit that check if the player in vehicle if not destroy the vehicle but i think isnt good idea :S
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimerEx("DesVeh", 60000, 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;
}
}
SetVehicleToRespawn(vehid);
return 1;
}
