alot of vehicles how to clear
#1

I'v a problem the cars in my server when player spawn it is removed when he exit from car , but when i back after a few hours i see that many cars spawned , so i think when player leave his car is stay iv this code

Код:
//DestroyVehicle
public OnPlayerExitVehicle(playerid,vehicleid)
{
    SetTimerEx("DestroyVehicle",10000,false,"i",vehicleid);
    return 1;
}
forward DestroyVehicle(vehicleid);
public DestroyVehicle(vehicleid)
{
    for(new i; i < MAX_PLAYERS; ++i)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return SetVehicleToRespawn(vehicleid); //DestroyVehicle(vehicleid);
}
I think i must put
Код:
SetTimerEx("DestroyVehicle",10000,false,"i",vehicleid);
at OnPlayerDisconnect shall i?
Reply


Messages In This Thread
alot of vehicles how to clear - by MahdiGames - 16.01.2014, 04:36
Re: alot of vehicles how to clear - by Aliassassin123456 - 16.01.2014, 04:45
Re: alot of vehicles how to clear - by MahdiGames - 16.01.2014, 04:53
Re: alot of vehicles how to clear - by Aliassassin123456 - 16.01.2014, 05:03
Re: alot of vehicles how to clear - by Threshold - 16.01.2014, 05:08
Re: alot of vehicles how to clear - by MahdiGames - 16.01.2014, 05:12

Forum Jump:


Users browsing this thread: 3 Guest(s)