Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    BIGBUCKS's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Posts
    92
    Reputation
    10
    Thanks
    9

    Thumbs up Want to learn CSGO coding. (New to CSGO coding, not coding in general)

    I would also like to start coding myself. I do have C++ and C# knowledge as I currently do a Level 7 course in Computing. Once I graduate im going into Software Development so Im not a beginner at coding, but I am a beginner at CSGO coding.

  2. #2
    ImStyL's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Location
    Antartica
    Posts
    145
    Reputation
    10
    Thanks
    2,063
    https://www.mpgh.net/forum/showthread.php?t=887645

     
    Quote Originally Posted by Motherflufferr View Post
    Hellolo!
    As there is loads and loads of people asking how to make hacks or how to learn C++, I decided to make a tutorial on how to start making hacks.
    Also, English is not my main language, so sorry if something is misspelled.
    What you will need:
    A brain
    Visual Studio or some other IDE.
    Will to learn.



    Chapter 1: Getting started
    You can't make a hack without knowing the basics. For learning the basics I recommend bucky/thenewboston's tutorials at youtube..
    When you've learned the basics, you're pretty much ready to make a triggerbot.
    Challenges/ideas to sharpen your skills:
    Small programs:
    Challenge 1:1
    Make a program that takes first name, last name, and birth year, month, date and stores it to a .txt file.
    Challenge 1:2
    Same program as above but if the file already exists it greets the user with first name, last name and prints out how old they are and wishes them happy birthday if it is the user's birthday.
    Challenge 1:3
    Same program as above but with a whole family.
    Challenge 1:4
    Same program but stores more info as favorite sports and so on (chosen by user, so you ask them if they have anything they want to say about them selves.)
    Hint(s): fstream

    Bigger programs:
    Challenge 1:1
    Make a 'bot' that answers the users questions and asks them.
    Hint(s): If/else, switch
    Challenge 1:2
    Make it store info if the user says wrong answer or something similar.
    Challenge 1:3 (This one is very hard)
    Make it remember stuff, learn, like a human.

    NOTE: The best way of learning is through trial and error, so be sure to experiment.



    Chapter 2: Making a triggerbot, reading memory.
    ProcMem files is in the attachments
    Making a triggerbot is veeeeeeeeeery easy when you know the basics and understand memory reading.
    You're probably scratching your head and thinking Wtf is memory reading? How do I read memory?
    Basically, it's reading information from a process/program. In this tutorial, we will be reading info about the entity(player) in our crosshair and info about our own player, which will become a triggerbot.
    You may be thinking, what do I need to read memory?
    The easiest way would be ProcMem(Process Memory). It's a class made by Fleep(I think?) that makes memory reading alot easier for beginners, as you save time by having all memory reading functions you need done. This is attached to the thread as a .rar file!

    First, we start by creating our main.cpp file and adding ProcMem.cpp and ProcMem.h from the downloaded .rar file. You do this in visual studio by right clicking source files -> Add -> Existing item and choosing ProcMem.cpp. Then you do the same but in Header Files with ProcMem.h.

    Then we need to initialize ProcMem in our main.cpp file so we can use the functions from it:
    Code:
    #include "ProcMem.h" // Memory reading
    ProcMem Mem; // Shortcut
    To actually read process memory, we need to choose a process. In this tutorial, it is going to be csgo.
    Code:
    Mem.Process("csgo.exe"); // Choosing the process
    Now we can read memory, but reading stuff as EntityBase, PlayerBase and so on we need the Client.dll from csgo.
    Code:
    DWORD ClientDLL = Mem.Module("client.dll"); //Module we are reading memory from
    Now we have initialized everything we need related to memory reading. Now, to the boring part, offsets.
    Offsets is basically where the info we need to read is located, so if we are going to read PlayerBase, we need the PlayerBase offset.
    I'm not going to cover how to get them through cheat engine, so we are going to use a offset dumper. That is basically a program that gets the offsets for us. These can usually be found in a thread on another forum, just google on Global Offensive Structs/Offsets. Here is the ones you need: (Updated 12-08-2014)
    Code:
    // Needs to be updated when counter strike is updated.
    const DWORD playerBase = 0xA68A14;
    const DWORD entityBase = 0x4A0B0C4;
    const DWORD crosshairOffset = 0x23F8;
    // Does not change on updated, in other words, no need to update these! 
    const DWORD teamOffset = 0xF0;
    const DWORD healthOffset = 0xFC;
    const DWORD EntLoopDist = 0x10;
    We are finally done initializing everything we need for a simple triggerbot!
    Now, to the actual memory reading.
    To get our own player's info, we read ClientDLL (The module in csgo that contains the info we need) + PlayerBase.
    Code:
    // our player
    DWORD LocalPlayer = Mem.Read<DWORD>(ClientDLL + PlayerBase);
    // our player's team, so we can compare it to the player in our crosshair and shoot if its not our own player's team.
    int LocalTeam = Mem.Read<int>(LocalPlayer + teamOffset);
    // our player's crosshair ID, it is used for reading what is in our crosshair
    int CrossHairID = Mem.Read<int>(LocalPlayer + CrosshairOffset);
    Now that we got the needed info for our player, we need to create our Triggerbot function. Name it anything you want, I will name mine Trigger.
    Now we got to read the memory needed inside our triggerbot function.
    Code:
    void Trigger()
    {
        DWORD EnemyInCH = Mem.Read<DWORD>(ClientDLL + EntityBase + ((CrossHairID - 1) * EntLoopDist)); // CH = Crosshair.
        int EnemyHealth = Mem.Read<int>(EnemyInCH + healthOffset); // Enemy in crosshair's 
        int EnemyTeam = Mem.Read<int>(EnemyInCH + teamOffset); // Enemy in crosshair's team, we need this to compare it to our own player's team)
    }
    To not shoot at friends, we need to make sure the enemy team is not the same local team.
    We can do this like this:
    Code:
    if (LocalTeam != EnemyTeam)
    {
        // shoot
    }
    But it is going to shoot at dead enemies. To prevent this, we can check if EnemyHealth is bigger than 0.
    Code:
    if (EnemyHealth > 0)
    {
        // shoot
    }
    To make the code less messy, we will check the team and health in the same if statement.
    Code:
    if (LocalTeam != EnemyTeam && EnemyHealth > 0)
    {
        // Shoot
    }
    Now we got a prefect triggerbot. but it does not shoot. As this is going to be a memory reading only triggerbot, we are going to simulate a mouse press instead of forcing it through writing memory. We are going to use mouse_event. If you want to, you can check out the mouse_event"]mouse_event page on MSDN[/URL] and try to understand it. You should be able to figure it out if you actually watched the tutorial I linked earlier, but anyways, here's the finished Trigger function code:
    Code:
    void Trigger()
    {
        DWORD EnemyInCH = Mem.Read<DWORD>(ClientDLL + EntityBase + ((CrossHairID - 1) * EntLoopDist)); // CH = Crosshair.
        int EnemyHealth = Mem.Read<int>(EnemyInCH + healthOffset); // Enemy in crosshair's 
        int EnemyTeam = Mem.Read<int>(EnemyInCH + teamOffset); // Enemy in crosshair's team, we need this to compare it to our own player's team)
        if (LocalTeam != EnemyTeam && EnemyHealth > 0)
        {
        // Here you can add a delay before shooting, to make it look legit. This is done using Sleep()
        mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
        // use Sleep() here for shooting several shots with an ak for example. Not usable with pisto
        mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
        // use Sleep() here for a 'cooldown' between shots.
        }
    now you need to add the function in your main() in a loop.
    Code:
    int main()
    {
        while(true)
        {
            Trigger();
            // Add a Sleep() here for less cpu usage.
        }
    }
    Now you have a working triggerbot!
    It is probably detected, but anyways.
    Have fun with it!



     

    Chapter 3: Making an aimbot, world to screen, distance.
    Comming soon.



    Chapter 4: Making a menu, toggable hacks, menu.
    Comming soon.



    Chapter 5: Making an ESP with DirectX
    Comming soon.


     

    #include "ProcMem.h"

    using namespace std;

    #pragma region Misc Functions

    ProcMem::ProcMem(){

    }

    ProcMem::~ProcMem(){
    CloseHandle(hProcess);
    }


    int ProcMem::chSizeOfArray(char *chArray){


    for (int iLength = 1; iLength < MAX_PATH; iLength++)
    if (chArray[iLength] == '*')
    return iLength;

    cout << "\nLENGTH: Failed To Read Length Of Array\n";
    return 0;
    }


    int ProcMem::iSizeOfArray(int *iArray){


    for (int iLength = 1; iLength < MAX_PATH; iLength++)
    if (iArray[iLength] == '*')
    return iLength;

    cout << "\nLENGTH: Failed To Read Length Of Array\n";
    return 0;
    }


    bool ProcMem::iFind(int *iAry, int iVal){

    for (int i = 0; i < 64; i++)
    if (iVal == iAry[i] && iVal != 0)
    return true;

    return false;
    }

    #pragma endregion



    #pragma region Memory Functions


    void ProcMem::Process(char* ProcessName){


    HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
    PROCESSENTRY32 ProcEntry;
    ProcEntry.dwSize = sizeof(ProcEntry);


    do
    if (!strcmp(ProcEntry.szExeFile, ProcessName))
    {


    dwPID = ProcEntry.th32ProcessID;
    CloseHandle(hPID);


    hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID);
    return;
    }
    while (Process32Next(hPID, &ProcEntry));

    cout << "\nPROCESS: Process Not Found\n";
    system("pause");
    exit(0);
    }


    void ProcMem::Patch(DWORD dwAddress, char *Patch_Bts, char *Default_Bts){


    int iSize = chSizeOfArray(Default_Bts);


    if (!bPOn)
    for (int i = 0; i < iSize; i++)
    Read<BYTE>(dwAddress + i, Patch_Bts[i]);
    else
    for (int i = 0; i < iSize; i++)
    Read<BYTE>(dwAddress + i, Default_Bts[i]);

    bPOn = !bPOn;
    }

    DWORD ProcMem::AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *Bytes){


    int iBytesToRead = 0, iTmp = 0;
    int length = chSizeOfArray(Bytes);
    bool bTmp = false;


    if (Bytes[0] == '?')
    {
    for (; iBytesToRead < MAX_PATH; iBytesToRead++)
    if (Bytes[iBytesToRead] != '?')
    {
    iTmp = (iBytesToRead + 1);
    break;
    }
    }


    for (; dwAddress < dwEnd; dwAddress++)
    {
    if (iBytesToRead == length)
    return dwAddress - iBytesToRead;

    if (Read<BYTE>(dwAddress) == Bytes[iBytesToRead] || (bTmp && Bytes[iBytesToRead] == '?'))
    {
    iBytesToRead++;
    bTmp = true;
    }
    else
    {
    iBytesToRead = iTmp;
    bTmp = false;
    }
    }

    cout << "\nAOB_SCAN: Failed To Find Byte Pattern\n";
    return 0;
    }


    DWORD ProcMem::Module(LPSTR ModuleName){


    HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
    MODULEENTRY32 mEntry;
    mEntry.dwSize = sizeof(mEntry);


    do
    if (!strcmp(mEntry.szModule, ModuleName))
    {
    CloseHandle(hModule);
    return (DWORD)mEntry.modBaseAddr;
    }
    while (Module32Next(hModule, &mEntry));

    cout << "\nMODULE: Process Platform Invalid\n";
    return 0;
    }

    #pragma endregion


     

    #ifndef PROCMEM_H
    #define PROCMEM_H

    #define WIN32_LEAN_AND_MEAN

    #include <windows.h>
    #include <iostream>
    #include <TlHelp32.h>
    #include <string>
    #include <sstream>

    class ProcMem{
    protected:


    HANDLE hProcess;
    DWORD dwPID, dwProtection, dwCaveAddress;


    BOOL bPOn, bIOn, bProt;

    public:


    ProcMem();
    ~ProcMem();
    int chSizeOfArray(char *chArray);
    int iSizeOfArray(int *iArray);
    bool iFind(int *iAry, int iVal);

    #pragma region TEMPLATE MEMORY FUNCTIONS





    template <class cData>
    cData Read(DWORD dwAddress)
    {
    cData cRead;
    ReadProcessMemory(hProcess, (LPVOID)dwAddress, &cRead, sizeof(cData), NULL);
    return cRead;
    }


    template <class cData>
    cData Read(DWORD dwAddress, char *Offset, BOOL Type)
    {

    int iSize = iSizeOfArray(Offset) - 1;
    dwAddress = Read<DWORD>(dwAddress);


    for (int i = 0; i < iSize; i++)
    dwAddress = Read<DWORD>(dwAddress + Offset[i]);

    if (!Type)
    return dwAddress + Offset[iSize];
    else
    return Read<cData>(dwAddress + Offset[iSize]);
    }


    template <class cData>
    void Read(DWORD dwAddress, cData Value)
    {
    ReadProcessMemory(hProcess, (LPVOID)dwAddress, &Value, sizeof(cData), NULL);
    }


    template <class cData>
    void Read(DWORD dwAddress, char *Offset, cData Value)
    {
    Read<cData>(Read<cData>(dwAddress, Offset, false), Value);
    }


    virtual void Process(char* ProcessName);
    virtual void Patch(DWORD dwAddress, char *chPatch_Bts, char *chDefault_Bts);
    virtual DWORD AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *chPattern);
    virtual DWORD Module(LPSTR ModuleName);

    #pragma endregion

    };
    #endif
    Last edited by ImStyL; 04-04-2016 at 07:00 PM.




    Got a question or need help?
    Click here to add me on Skype





  3. The Following User Says Thank You to ImStyL For This Useful Post:

    Stylar (04-08-2016)

  4. #3
    CyanRed3's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    cfitsio.dll
    Posts
    79
    Reputation
    10
    Thanks
    425
    My Mood
    Cheerful
    Quote Originally Posted by ImStyL View Post
    https://www.mpgh.net/forum/showthread.php?t=887645

     



     

    #include "ProcMem.h"

    using namespace std;

    #pragma region Misc Functions

    ProcMem::ProcMem(){

    }

    ProcMem::~ProcMem(){
    CloseHandle(hProcess);
    }


    int ProcMem::chSizeOfArray(char *chArray){


    for (int iLength = 1; iLength < MAX_PATH; iLength++)
    if (chArray[iLength] == '*')
    return iLength;

    cout << "\nLENGTH: Failed To Read Length Of Array\n";
    return 0;
    }


    int ProcMem::iSizeOfArray(int *iArray){


    for (int iLength = 1; iLength < MAX_PATH; iLength++)
    if (iArray[iLength] == '*')
    return iLength;

    cout << "\nLENGTH: Failed To Read Length Of Array\n";
    return 0;
    }


    bool ProcMem::iFind(int *iAry, int iVal){

    for (int i = 0; i < 64; i++)
    if (iVal == iAry[i] && iVal != 0)
    return true;

    return false;
    }

    #pragma endregion



    #pragma region Memory Functions


    void ProcMem::Process(char* ProcessName){


    HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
    PROCESSENTRY32 ProcEntry;
    ProcEntry.dwSize = sizeof(ProcEntry);


    do
    if (!strcmp(ProcEntry.szExeFile, ProcessName))
    {


    dwPID = ProcEntry.th32ProcessID;
    CloseHandle(hPID);


    hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID);
    return;
    }
    while (Process32Next(hPID, &ProcEntry));

    cout << "\nPROCESS: Process Not Found\n";
    system("pause");
    exit(0);
    }


    void ProcMem::Patch(DWORD dwAddress, char *Patch_Bts, char *Default_Bts){


    int iSize = chSizeOfArray(Default_Bts);


    if (!bPOn)
    for (int i = 0; i < iSize; i++)
    Read<BYTE>(dwAddress + i, Patch_Bts[i]);
    else
    for (int i = 0; i < iSize; i++)
    Read<BYTE>(dwAddress + i, Default_Bts[i]);

    bPOn = !bPOn;
    }

    DWORD ProcMem::AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *Bytes){


    int iBytesToRead = 0, iTmp = 0;
    int length = chSizeOfArray(Bytes);
    bool bTmp = false;


    if (Bytes[0] == '?')
    {
    for (; iBytesToRead < MAX_PATH; iBytesToRead++)
    if (Bytes[iBytesToRead] != '?')
    {
    iTmp = (iBytesToRead + 1);
    break;
    }
    }


    for (; dwAddress < dwEnd; dwAddress++)
    {
    if (iBytesToRead == length)
    return dwAddress - iBytesToRead;

    if (Read<BYTE>(dwAddress) == Bytes[iBytesToRead] || (bTmp && Bytes[iBytesToRead] == '?'))
    {
    iBytesToRead++;
    bTmp = true;
    }
    else
    {
    iBytesToRead = iTmp;
    bTmp = false;
    }
    }

    cout << "\nAOB_SCAN: Failed To Find Byte Pattern\n";
    return 0;
    }


    DWORD ProcMem::Module(LPSTR ModuleName){


    HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
    MODULEENTRY32 mEntry;
    mEntry.dwSize = sizeof(mEntry);


    do
    if (!strcmp(mEntry.szModule, ModuleName))
    {
    CloseHandle(hModule);
    return (DWORD)mEntry.modBaseAddr;
    }
    while (Module32Next(hModule, &mEntry));

    cout << "\nMODULE: Process Platform Invalid\n";
    return 0;
    }

    #pragma endregion


     

    #ifndef PROCMEM_H
    #define PROCMEM_H

    #define WIN32_LEAN_AND_MEAN

    #include <windows.h>
    #include <iostream>
    #include <TlHelp32.h>
    #include <string>
    #include <sstream>

    class ProcMem{
    protected:


    HANDLE hProcess;
    DWORD dwPID, dwProtection, dwCaveAddress;


    BOOL bPOn, bIOn, bProt;

    public:


    ProcMem();
    ~ProcMem();
    int chSizeOfArray(char *chArray);
    int iSizeOfArray(int *iArray);
    bool iFind(int *iAry, int iVal);

    #pragma region TEMPLATE MEMORY FUNCTIONS





    template <class cData>
    cData Read(DWORD dwAddress)
    {
    cData cRead;
    ReadProcessMemory(hProcess, (LPVOID)dwAddress, &cRead, sizeof(cData), NULL);
    return cRead;
    }


    template <class cData>
    cData Read(DWORD dwAddress, char *Offset, BOOL Type)
    {

    int iSize = iSizeOfArray(Offset) - 1;
    dwAddress = Read<DWORD>(dwAddress);


    for (int i = 0; i < iSize; i++)
    dwAddress = Read<DWORD>(dwAddress + Offset[i]);

    if (!Type)
    return dwAddress + Offset[iSize];
    else
    return Read<cData>(dwAddress + Offset[iSize]);
    }


    template <class cData>
    void Read(DWORD dwAddress, cData Value)
    {
    ReadProcessMemory(hProcess, (LPVOID)dwAddress, &Value, sizeof(cData), NULL);
    }


    template <class cData>
    void Read(DWORD dwAddress, char *Offset, cData Value)
    {
    Read<cData>(Read<cData>(dwAddress, Offset, false), Value);
    }


    virtual void Process(char* ProcessName);
    virtual void Patch(DWORD dwAddress, char *chPatch_Bts, char *chDefault_Bts);
    virtual DWORD AOB_Scan(DWORD dwAddress, DWORD dwEnd, char *chPattern);
    virtual DWORD Module(LPSTR ModuleName);

    #pragma endregion

    };
    #endif
    "Here is a post of a example/tutorial of a hack, and the files that you need for the hack." :/

  5. #4
    KappaMang's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    242
    Reputation
    10
    Thanks
    16
    My Mood
    Asleep
    Quote Originally Posted by CyanRed3 View Post
    "Here is a post of a example/tutorial of a hack, and the files that you need for the hack." :/
    Yea but that's just the boring memory code. The important stuff is the actual hack.

  6. #5
    PhY'z's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    518
    Reputation
    58
    Thanks
    1,310
    My Mood
    Angelic
    Quote Originally Posted by KappaMang View Post
    Yea but that's just the boring memory code. The important stuff is the actual hack.
    Wat?? Sorry, but, wtf?
    Contact with me in any question...


    Hi (:

  7. #6
    WasserEsser's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Posts
    735
    Reputation
    174
    Thanks
    677
    My Mood
    Busy
    Posting a memory class doesn't help. Posting bad code doesn't help either.
    That's why watching Fleep sucks.

    In order to teach someone how to make cheats, you need to teach them how cheats work, what their purpose is, what they do to achieve their purpose and then how to code them.

    A tutorial for that from my side will follow in the future.

  8. The Following 4 Users Say Thank You to WasserEsser For This Useful Post:

    Doctorate (04-05-2016),Hunter (04-05-2016),ImStyL (04-05-2016),Yemiez (04-05-2016)

  9. #7
    isbariya's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    75
    Reputation
    10
    Thanks
    3
    Do you want to make cheats or mods? I mean you would have to look to the SDK for that.

  10. #8
    rwby's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    client.dll
    Posts
    1,631
    Reputation
    142
    Thanks
    6,724
    Quote Originally Posted by isbariya View Post
    Do you want to make cheats or mods? I mean you would have to look to the SDK for that.
    You dont need the SDK to make cheats.

  11. #9
    isbariya's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    75
    Reputation
    10
    Thanks
    3
    I meant about modding, if he wants to mod then he needs the SDK

  12. #10
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    It's mainly all logic really, for example:

    Pseudocode:
    Code:
    void OnLand( Cheat *sender, Player *player )
    {
        // If Bhop is enabled
        if ( cheat->isBhopEnabled( ) )
           player->BitOr( FLAG_JUMP ); // set the jump flag
    }
    
    void OnAir( Cheat *sender, Player *player )
    {
        // If Bhop is enabled
        if ( cheat->isBhopEnabled( ) )
             player->BitAnd( ~FLAG_JUMP ); // unset the jump flag
    }
    
    void OnFoundEntity( Cheat *sender, Player *player, Entity *aiming_at )
    {
        // If Trigger is enabled
        if ( cheat->IsTriggerEnabled( ) )
             player->BitOr( FLAG_SHOOT );  // Set the shoot flag
    }
    
    void OnLostEntity( Cheat *sender, Player *player, Entity *was_aiming_at )
    {
        // If trigger is enabled
        if ( cheat->IsTriggerEnabled( ) )
             player->BitAnd( ~FLAG_SHOOT ); // Unset the shoot flag
    }
    Obviously, there are thousands of ways to do stuff, however, I prefer event-based coding as it does make your program layout easier to understand. Another reason why I like event-based programs is because the front end can be made however you want if the Player/Cheat/Entity etc are all the same, meaning the backend can be external or internal and just wrap the Player/Cheat/Entity structures around the information it has.
    Last edited by Hunter; 04-05-2016 at 11:48 AM.

  13. #11
    KappaMang's Avatar
    Join Date
    Mar 2016
    Gender
    male
    Posts
    242
    Reputation
    10
    Thanks
    16
    My Mood
    Asleep
    Quote Originally Posted by WasserEsser View Post
    Posting a memory class doesn't help. Posting bad code doesn't help either.
    That's why watching Fleep sucks.

    In order to teach someone how to make cheats, you need to teach them how cheats work, what their purpose is, what they do to achieve their purpose and then how to code them.

    A tutorial for that from my side will follow in the future.
    I started with Fleep. While I admit I'm still pretty stupid and don't know a lot I still started somewhere.

  14. #12
    _NightWare's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Netherlands
    Posts
    724
    Reputation
    274
    Thanks
    2,302
    My Mood
    Inspired
    Quote Originally Posted by Yamiez View Post
    It's mainly all logic really, for example:

    Pseudocode:
    Code:
    void OnLand( Cheat *sender, Player *player )
    {
        // If Bhop is enabled
        if ( cheat->isBhopEnabled( ) )
           player->BitOr( FLAG_JUMP ); // set the jump flag
    }
    
    void OnAir( Cheat *sender, Player *player )
    {
        // If Bhop is enabled
        if ( cheat->isBhopEnabled( ) )
             player->BitAnd( ~FLAG_JUMP ); // unset the jump flag
    }
    
    void OnFoundEntity( Cheat *sender, Player *player, Entity *aiming_at )
    {
        // If Trigger is enabled
        if ( cheat->IsTriggerEnabled( ) )
             player->BitOr( FLAG_SHOOT );  // Set the shoot flag
    }
    
    void OnLostEntity( Cheat *sender, Player *player, Entity *was_aiming_at )
    {
        // If trigger is enabled
        if ( cheat->IsTriggerEnabled( ) )
             player->BitAnd( ~FLAG_SHOOT ); // Unset the shoot flag
    }
    Obviously, there are thousands of ways to do stuff, however, I prefer event-based coding as it does make your program layout easier to understand. Another reason why I like event-based programs is because the front end can be made however you want if the Player/Cheat/Entity etc are all the same, meaning the backend can be external or internal and just wrap the Player/Cheat/Entity structures around the information it has.
    I posted something similair, wonder where it went :s
    Anyways, event based is realy grat, never thought about that.

    Does event based coding directly mean more optimized? Or are there better ways to optimize code?

    Feel free to leave a thanks or +rep if I helped you.

    ಠ_ರೃ
    Script Squad






    [IMG]https://roblo*****m?rbxp=135887430[/IMG]

  15. #13
    Yemiez's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    Sweden
    Posts
    2,566
    Reputation
    731
    Thanks
    16,280
    My Mood
    Devilish
    Quote Originally Posted by _NightWare View Post
    I posted something similair, wonder where it went :s
    Anyways, event based is realy grat, never thought about that.
    I replied to you, mine was also deleted, so unsure :?

    Quote Originally Posted by _NightWare View Post
    Does event based coding directly mean more optimized? Or are there better ways to optimize code?
    Not necessarily, depends on the implementation

  16. #14
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    Quote Originally Posted by Yamiez View Post
    I replied to you, mine was also deleted, so unsure :?



    Not necessarily, depends on the implementation
    I wonder why, Mr. CringeSoBadly.
    Last edited by Hunter; 04-06-2016 at 05:58 AM.

  17. #15
    UltraCoder's Avatar
    Join Date
    Aug 2015
    Gender
    male
    Location
    Norway
    Posts
    58
    Reputation
    10
    Thanks
    160
    My Mood
    Inspired
    You have choices from my point of view:

    1, Go online and look at some tutorials and then copypaste hacks until you make them work

    2, Go buy a book and learn the actual language first, then look at source codes, tutorials and write your own code.
    Programming and stuff...
    Skype: ultracoder217

Page 1 of 2 12 LastLast

Similar Threads

  1. [WTT] Wanting to trade my Arma 3 acc for Dayz SA code or a Dayz SA account /csgo skins
    By Fly_Wood in forum DayZ Selling / Trading / Buying
    Replies: 5
    Last Post: 01-12-2016, 01:05 AM
  2. New Started. (Wanting To Learn Coding)
    By Xelerate in forum Member Introduction & Return
    Replies: 19
    Last Post: 01-13-2013, 07:09 PM
  3. I want to Learn Coding.
    By ~G36E~ in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 2
    Last Post: 02-22-2010, 01:29 PM
  4. [Discussion] Coding new hack, what features do you want?
    By beta_guy in forum CrossFire Hacks & Cheats
    Replies: 116
    Last Post: 02-21-2010, 11:28 PM
  5. Wanting to learn hack-coding basics
    By gwentravolta in forum Programming Tutorial Requests
    Replies: 13
    Last Post: 09-05-2009, 10:29 AM