Is there an more efficient way to do this?
#3

Quote:
Originally Posted by lolumadd_
Посмотреть сообщение
Код:
DestroyHangar()
{
	for(new i=0; i < sizeof ResprayHangar; i++) // loop through all indexes of respray hangar
	{
		if(IsValidObject(ResprayHangar[i])) // check if the object was created...maybe not all variable indexes contain object id's
		{
			DestroyObject(ResprayHangar[i]); // destroy the object
		}
	}	
}
"more efficient way to do this"

Laying it out directly is faster than a loop.

pawn Код:
DestroyObject(ResprayHangar[1]);
DestroyObject(ResprayHangar[2]);
DestroyObject(ResprayHangar[3]);
Reply


Messages In This Thread
Is there an more efficient way to do this? - by xTURBOx - 12.06.2016, 15:46
Re: Is there an more efficient way to do this? - by lolumadd_ - 12.06.2016, 15:58
Re: Is there an more efficient way to do this? - by SickAttack - 12.06.2016, 15:59
Re: Is there an more efficient way to do this? - by xTURBOx - 12.06.2016, 16:02
Re: Is there an more efficient way to do this? - by lolumadd_ - 12.06.2016, 16:04
Re: Is there an more efficient way to do this? - by xTURBOx - 12.06.2016, 16:15
Re: Is there an more efficient way to do this? - by lolumadd_ - 12.06.2016, 16:43

Forum Jump:


Users browsing this thread: 2 Guest(s)