• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 7 of 7

    Thread: Float value

    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      KR4N3N64's Avatar
      Join Date
      Oct 2012
      Posts
      9
      Thanks (-->)
      0
      Thanks (<--)
      0

      Float value

      Silent VPN
      Hi all, how can i write float value with this function: WriteProcessMemory(hProcHandle, address, value, sizeof(value), null) ?? thx

    2. #2
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      thegood's Avatar
      Join Date
      Oct 2012
      Location
      Germany
      Posts
      7
      Thanks (-->)
      0
      Thanks (<--)
      0
      The question is, wether the program you want to hack, accept float values !?

      Ok, float values are not given in the memory, there are just values, who "describe" the float value!
      The function "WriteProcessMemory" only accepts LPCVOID, i thik this should be a 4 byte value !?
      So we have to convert the float number to a 4 byte value:

      #include <iostream>
      #include <Windows.h>

      using namespace std;

      int main()
      {
      float fNumber = 3.141; //type in your number you want to "hack" here
      float *pointer = &fNumber; //pointer to this number
      int *intpointer = (int *) pointer; //cast to int-pointer

      cout<<"Value as float: "<<*pointer<<" Value as 4-byte-integer: "<<*intpointer<<endl;
      //you can get now the memory of the float-value as int-value

      system("pause");

      return 0;
      }

      the value as 4-byte-integer you can type in into the WriteProcessMemory-function
      I hope this will work.

      thegood
      Last edited by thegood; 10-22-2012 at 04:35 PM.

    3. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      KR4N3N64's Avatar
      Join Date
      Oct 2012
      Posts
      9
      Thanks (-->)
      0
      Thanks (<--)
      0
      Hi, im trying to hack gta sa and the health bar is a float value but i cant write a value with WriteProcessMemory function. and i dont understand how to use your code, im new in c++.. Sry for my english

      Note: The address has only one offset
      Last edited by KR4N3N64; 10-22-2012 at 05:45 PM.

    4. #4
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Typ3Cast's Avatar
      Join Date
      Oct 2012
      Posts
      5
      Thanks (-->)
      0
      Thanks (<--)
      1
      static void WriteFloat(LPVOID Address, float Data)
      {
      unsigned long protect;
      VirtualProtectEx(hProc, (void*)Address, 4,PAGE_EXECUTE_READWRITE, &protect);
      if (!WriteProcessMemory(hProc, (LPVOID)Address, &Data, sizeof(float), &dSize))
      {
      system("color C");
      system("cls");
      printf("Error writing process memory!");
      getch();
      }
      VirtualProtectEx(hProc, (void*)Address, 4, protect, &protect);
      }
      https://forum.cheatengine.org/viewto...7f34993553fa8a

    5. #5
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      thegood's Avatar
      Join Date
      Oct 2012
      Location
      Germany
      Posts
      7
      Thanks (-->)
      0
      Thanks (<--)
      0
      mh, cant help you now, maybe you can send some screenshots, code or memory regions ?!

    6. #6
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      NubTIK's Avatar
      Join Date
      Dec 2012
      Posts
      61
      Thanks (-->)
      1
      Thanks (<--)
      40
      Float Values

      I cant seem to undesrtand why this would be an issue:

      Code:
      float Value = 2.0f; 
      float ValueArray[3] = {2.0f, 3.0f, 4.0f};
      Writing the normal Float Value

      Code:
      WriteProcessMemory (Process, (LPVOID)(Address), &Value, sizeof(float), 0);
      Writing the Float Array Value
      Code:
      WriteProcessMemory (Process, (LPVOID)(Address), &ValueArray, sizeof(float[3]), 0);
      Last edited by NubTIK; 12-31-2012 at 01:08 PM.

    7. #7
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      NubTIK's Avatar
      Join Date
      Dec 2012
      Posts
      61
      Thanks (-->)
      1
      Thanks (<--)
      40
      Silent VPN
      Quote Originally Posted by thegood View Post
      The question is, wether the program you want to hack, accept float values !?

      Ok, float values are not given in the memory, there are just values, who "describe" the float value!
      The function "WriteProcessMemory" only accepts LPCVOID, i thik this should be a 4 byte value !?
      So we have to convert the float number to a 4 byte value:

      #include <iostream>
      #include <Windows.h>

      using namespace std;

      int main()
      {
      float fNumber = 3.141; //type in your number you want to "hack" here
      float *pointer = &fNumber; //pointer to this number
      int *intpointer = (int *) pointer; //cast to int-pointer

      cout<<"Value as float: "<<*pointer<<" Value as 4-byte-integer: "<<*intpointer<<endl;
      //you can get now the memory of the float-value as int-value

      system("pause");

      return 0;
      }

      the value as 4-byte-integer you can type in into the WriteProcessMemory-function
      I hope this will work.

      thegood
      Good post, I just wanna point out that LPCVOID Is NOT The only thing it accepts... what about PBYTE* ?
      ≧◔◡◔≦

    Similar Game Hacker Threads

    1. RPM from float pointer.
      By Clarityworld in forum Hacking Help
      Replies: 2
      Last Post: 05-28-2015, 02:55 PM
    2. [Help] Help Reading Float with Multilevel Pointer c#
      By coolestgamer123 in forum Hacking Help
      Replies: 3
      Last Post: 01-09-2015, 08:43 PM
    3. [Help] Finding Float From Multilevel Pointer with DLL Base Address C#
      By coolestgamer123 in forum Hacking Help
      Replies: 3
      Last Post: 12-23-2014, 02:08 PM
    4. [Help] Float / Double - Find Pointer?
      By Vultrax in forum Visual Basic
      Replies: 3
      Last Post: 03-30-2014, 12:49 PM