UnhappyHow to make the code automatically trigger؟؟؟؟؟؟

Posts 1–4 of 4 · Page 1 of 1
How to make the code automatically trigger؟؟؟؟؟؟
Code:
#include "Engine.h"
#include "Settings.h"
#include "Decrypt.h"

class Triggerbot {

[junk_enable /]

public: 
	void run() {
		bool autoAttacking = false;
		if (!(Settings()->trigger_key || Settings()->triggerEnabled)) {
            return;
        }
		while (true) {
			[add_junk /]
			if (autoAttacking && KeyUp(VK_LBUTTON)) {
                Engine()->Memory()->Write<int>(Engine()->getClientModule()->dwBase + Engine()->Offsets()->dwAttack, 4);
                autoAttacking = false;
			}
			[add_junk /]
			if (!Engine()->me.is_alive) {
                Sleep(3000);
                continue;
			}
			if (!isTriggerEnabled()) {
                continue;
            }
            [add_junk /]
            if (Engine()->me.weapon_ammo > 0 && inCrosshair()) {
                Sleep(Settings()->triggerdelay);
                Engine()->Memory()->Write<int>(Engine()->getClientModule()->dwBase + Engine()->Offsets()->dwAttack, 5);
                autoAttacking = true;
                Sleep(50);
            }
            [add_junk /]
		}
		[add_junk /]
	}

private:
    bool isTriggerEnabled() {
		[add_junk /]
        if (!Settings()->triggerEnabled) {
            return false;
            [add_junk /]        
        }
        // If we're not using the holdkey, then it's always enabled
        if (Settings()->trigger_holdkey == 0) {
            return true;
            [add_junk /]
        }
        // Otherwise it's only enabled if holdkey is currently being held
        return KeyDown(Settings()->trigger_holdkey);
        [junk_disable /]
    }
	bool inCrosshair() {
		[junk_enable /]
		[add_junk /]

		int idInX = Engine()->Memory()->Read<int>(Engine()->me.dwBase + Engine()->Offsets()->dwInCross);

		if (idInX != 0) {
			[add_junk /]
			for (int i = 0; i < Engine()->iEnemies; i++) {
				if (Engine()->entEnemies[i].id == idInX) {
					return (Engine()->entEnemies[i].hp > 0);
				}
			}
			[add_junk /]
		}
		[add_junk /]
		return false;
	}
[junk_disable /]
};

#endi
Dude it's literally commented for you and everything.
/close pls
/Closed upon request.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?