I have 300x300 m land where players after 240 seconds must be teleported away, but sometimes when timer is end, start counting like -1 -2 -3 ....... and teleporting away dont work!
Here is code
labirint_enter = getPlayerUID player; labirint = [ [ [3420,2076], [3670,2337], ["xxxxxxx","xxxxxxxx"] ] ]; _timer = 240; while {true} do { if( labirint_enter in ["1111","2222"] ) then { //admins while{true}do{}; }; _position = getPos player; _px = _position select 0;//X _py = _position select 1;//Y _flag = false; { _cx1 = (_x select 0) select 0; _cy1 = (_x select 0) select 1; _cx2 = (_x select 1) select 0; _cy2 = (_x select 1) select 1; _allowed = _x select 2; if ( _px > _cx1 && _px < _cx2 && _py > _cy1 && _py < _cy2 && !(labirint_enter in _allowed)) then { _flag = true; }; }forEach labirint; if ( _flag && alive player ) then { titleText [format ["%1",_timer],"PLAIN",0]; _timer = _timer - 1; }else{ _timer = 240; }; if ( _timer == -1 ) then { [] execVM "custom\spawning\locations\eject.sqf"; titleText ["","PLAIN",0]; }; sleep 1; };