07.01.2018, 09:33
Код:
new bool:ObjectFallen[100] = false; forward FalloutFall(); public FalloutFall() { for(new i = 0; i < MAX_PLAYERS; i++) { if(FalloutJoined[i] == true) { //some code } } new Fall = -1; while(Fall == -1) { Fall = random(100); if(ObjectFallen[Fall]) Fall = -1; } ObjectFallen[Fall] = true; new Float:oX, Float:oY, Float:oZ; GetObjectPos(fFallObject[Fall], oX, oY, oZ); MoveObject(fFallObject[Fall],oX,oY,oZ-5,5); if(AllObjectsFallen) ResetFallenObjects(); } AllObjectsFallen() { for(new i = 0; i < 100; i++) { if(!ObjectFallen[i]) return false; } return true; } ResetFallenObjects() { for(new i = 0; i < 100; i++) { ObjectFallen[i] = false; } }