Destroy all empty vehicles?
#1

Код:
public VehicleCheck()
{
    new empty = false;
    new currentveh;
    for(new i =0; i != MAX_VEHICLES; ++i)
    {
        for (new x = 0; x != MAX_PLAYERS; ++x)
	{
            if(GetPlayerVehicleID(x) != i)
	    {
		empty = true;
		currentveh = i;
	    }
	}
    }
    if(empty)
    {
	DestroyVehicle(currentveh);
    }
}
This is the code I wrote to attempt to destroy all empty vehicles.
I called it using a timer that runs every 1 second (1000ms) and it doesn't seem to clear up any vehicles that have no one in them. Any ideas?
Reply


Messages In This Thread
Destroy all empty vehicles? - by XxCozzaxX - 30.12.2011, 12:30
Re: Destroy all empty vehicles? - by Spooky - 30.12.2011, 12:35

Forum Jump:


Users browsing this thread: 1 Guest(s)