Results 1 to 2 of 2
  1. #1
    bobber1's Avatar
    Join Date
    Jan 2019
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    My Mood
    Fine

    Post GTA SAMP c++ writeprocessmemory Problem need some help!

    I made a trainer for gta san andreas samp.
    its an external hack that once it starts it uses a base address and some offsets to find the dynamic address that it will write to. it does this once.
    in the infinite loop, if i press a button example 4,6 it increments or decrements the x.y player values

    the code is somewhat like this (its simplified)

     


    HWND hwnd = FindWindowA(0, "GTA:SA:MP");
    GetWindowThreadProcessId(handle, &pid);
    HANDLE phandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);

    if(4 is pressed)
    {
    PlayerX--;
    }
    if(6 is pressed)
    {
    PlayerX++;
    }
    WriteProcessMemory(phandle, (LPVOID)(PointerX), &PlayerX, sizeof(float), 0);




    The hack works just as intended but...

    The problem is after some seconds or minutes later after use in samp. the game sorta locks. but not crash. everything works but. it doesnt register input like mouse and keyboard. and when i minimize the game and focus it again it doesnt go to the main menu!
    This shit only happen when i use the trainer.
    HELP PLZ!!
    BTW this only happens when writeprocessmemory is spammed
    readprocessmemory is fine when spammed every 50ms
    Last edited by bobber1; 02-09-2019 at 07:11 AM.

  2. #2
    kraneq's Avatar
    Join Date
    May 2019
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    ah shit, so this is the fix. Thanks dude, i had this problem also, now i know i just need to slow down my code easy

Similar Threads

  1. [Solved] Some As3 Problem i need some help with
    By atiken in forum Realm of the Mad God Private Servers Help
    Replies: 2
    Last Post: 04-12-2016, 02:26 PM
  2. [Help Request] Need some help on injecting dll's into GTA
    By Senedeus in forum Grand Theft Auto 5 (GTA V) Help
    Replies: 0
    Last Post: 10-22-2015, 04:26 PM
  3. Replies: 4
    Last Post: 05-30-2015, 01:13 PM
  4. Got a problem with a hack? Need some help? Then add me on xfire!
    By FatEmoLLaMa in forum Combat Arms Help
    Replies: 3
    Last Post: 10-02-2009, 05:39 PM
  5. I found a little problem, need some help real quick!~!~!
    By CrazyBish in forum Visual Basic Programming
    Replies: 7
    Last Post: 04-13-2009, 04:15 PM