Next available ID
#2

Код:
stock GetFreeVehicleSlot()
{
	for(new i = 1; i < MAX_VEHICLES; i ++)
	{
	    if(!IsValidVehicle(i)) return i;
	}
	return 0;
}
This will get the next vehicleid that is unused.
Reply


Messages In This Thread
Next available ID - by CloudLEL - 30.04.2016, 19:09
Re: Next available ID - by CalvinC - 30.04.2016, 19:52
Re: Next available ID - by CloudLEL - 30.04.2016, 20:06

Forum Jump:


Users browsing this thread: 1 Guest(s)