Naiss 28 Posted May 12, 2015 okay so im trying to code an anti-cheat but i don't know how i would check if an variable get changed without the server doing it someone please explain :) Thanks Share this post Link to post Share on other sites
opec666 22 Posted May 13, 2015 if ( isPlayer ) then { [] spawn { _endless = false; waitUntil { sleep 5; your-code-goes-here _endless }; }; }; This makes an infinitely-repeating loop that runs every 5 seconds, and happens only on the client. Share this post Link to post Share on other sites
whiztler 137 Posted May 14, 2015 Have a peek here: http://killzonekid.com/arma-scripting-tutorials-constructing-secure-callback/ Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted May 14, 2015 If there are variables which only the server should be using, add them to BattlEye scripts.txt. If the client should have read-only access to the variable, keep the root variable on server machine and periodically copy it and broadcast the copy. Alternatively, if the client should have write-access to the variable, pipe it through one function and use BattlEye exceptions to ensure the access is only made through that function. As for generic anti cheat, just use infistars or spyglass by Tonic. Smart coders have been down this road already, no need to find a different method. Share this post Link to post Share on other sites
dreadedentity 278 Posted May 14, 2015 (edited) I'm not very familiar with script injectors (nor would I feel comfortable downloading one, if I even knew where to), but you can "watch" a variable with code similar to this: "myGlobalVariable" spawn { while {true} do { _temp = missionNamespace getVariable _this; waitUntil {(missionNamespace getVariable _this) != _temp}; //check if change was legitimate //if change was not legitimate either warn player and incriment warning count or end mission for player }; }; Of course, this only works for global variables and specifically for the reason why global variables are recommended to be used sparingly (global vars are available in all scopes) Edited May 14, 2015 by DreadedEntity Share this post Link to post Share on other sites
Naiss 28 Posted May 14, 2015 Quote As for generic anti cheat, just use infistars or spyglass by Tonic. Smart coders have been down this road already, no need to find a different method. we i need to make sure i got permission first from tonic to use it and spyglass is made for altis life, so if i use that in my own framework that i made it may be abit weird stuff happening if you know what im saying :P Share this post Link to post Share on other sites
tonic-_- 53 Posted May 15, 2015 lifemanlive said: we i need to make sure i got permission first from tonic to use it and spyglass is made for altis life, so if i use that in my own framework that i made it may be abit weird stuff happening if you know what im saying :P You are free to nitpick it and stuff so long as you are not selling it like that moron infistar. Share this post Link to post Share on other sites
Naiss 28 Posted May 15, 2015 thanks tonic and it wont happen Share this post Link to post Share on other sites