12.06.2016, 15:59
Quote:
Код:
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 } } } |
Laying it out directly is faster than a loop.
pawn Код:
DestroyObject(ResprayHangar[1]);
DestroyObject(ResprayHangar[2]);
DestroyObject(ResprayHangar[3]);