GTA V: True Anti-Kick (Anti-Idle)
Counts X amount of seconds, if amount of seconds counted equals X and no user input has previously been detected then it presses R3. If user input is detected then the counter resets to 0. The scripts anti-kick only triggers if you are truly not using your controller for a certain amount of time!
|
RATE
|
Release Notes: Made with GTA V in mind but could work with other games depending on what conditions the game considers as "AFK or idle".
- Code: Select all
int afk_tick = 30; // The amount of seconds until anti-kick triggers.
int key; // Will represent a key on the controller
int msecs, secs;
main {
/*----- Anti Kick -----*/
msecs = msecs + get_rtime(); //Elapsed time in miliseconds
// Resets timer if any controller input detected
if(get_val(key) > 20 || get_val(key) < -20)
{
msecs = 0
secs = 0
}
// recursive loops through all keys on the controller
key = key + 1
if(key > 20)
{
key = 0
}
// converts miliseconds to seconds and checks if time elapsed equal afk_tick
if(msecs >= 1000)
{
msecs = msecs - 1000;
secs = secs + 1;
// checks if time elapsed equals afk_tick
if(secs >= afk_tick)
{
secs = secs - afk_tick;
combo_run(anti_afk);
}
}
set_val(TRACE_1, secs); /* Debug timer. Check TRACE_1 in device monitor,
shows seconds elapsed. */
}
combo anti_afk
{
set_val(PS4_R3, 100)
wait(50)
set_val(PS4_R3, 0)
}