Naiss 28 Posted April 26, 2014 okey so i got a script file that run on the server but i want it to stop at some time While {true} do { hint "test"; sleep 10; hint "hello i want to swich the true to false here, becuase i got an admin tool that can start it again so please help me here to make it stop there please help me here Share this post Link to post Share on other sites
ka3ant1p 10 Posted April 26, 2014 I think you have to add the definition of true first like this: _something = true; and then you change your code to while {_something} do. And make chack every x sec. If you do not the loop then toy can use if - else instead of while Share this post Link to post Share on other sites
Naiss 28 Posted April 26, 2014 okey thanks for the answer i will try this ---------- Post added at 23:12 ---------- Previous post was at 21:29 ---------- okey so when i got a script while running with while true i want a new script file that can stop that while true and make that script file stop Share this post Link to post Share on other sites
Harzach 2518 Posted April 28, 2014 Basically the same, only you need to use a global variable: hello.sqf myGlobalVariable = true; While {myGlobalVariable == true} do { hint "test"; sleep 10; hint "hello"; } else { hint "goodbye"; }; goodbye.sqf myGlobalVariable = false; Or something like that. Share this post Link to post Share on other sites