Built-in Function:
Request: test
function(funcName)
Usage: test
function("onwall2");
Returns: true if function exists, false if it doesn't.
Why? Cheat Engine and other memory editors that can pass through the cheat windows check, and rename functions by searching for text.
Usage in script:
PHP Code:
function onActionServerSide(action, args) {
switch (action) {
case "hacker":
temp.report = format("%s has renamed function %s!", player.account, args[0]);
echo("[ Hack-Control ]: " @ temp.report);
savelog2("functionlog.txt", temp.report);
break;
}
}
//#CLIENTSIDE
function onCreated() {
this.check = {"onactionprojectile", "onactionprojectile2", "onwall", "onwall2"};
this.onTimeout();
}
function onTimeout() {
for (temp.var : this.check) {
if (this.tes[t]function(temp.var)) continue;
// Hacker Found!
triggerserver("gui", this.name, "hacker", {temp.var});
player.serverwarp(this.getservername()); // warps player back to server, if cheat engine, it will normally report to the rc that a player was using cheat engine ( mostly used to avoid the windows check )
break;
}
this.setTimer(300); // check every 5 minutes
}