+ Reply to Thread
Showing results 1 to 5 of 5

Thread: [Starcraft] Conversion of int to char for Stats Hack.

  1. #1

    Heretic
    c4tAc0mB is on a distinguished road
    Join Date
    Oct 2007
    Posts
    33
    Downloads
    0
    Uploads
    0

    [Starcraft] Conversion of int to char for Stats Hack.

    Hello, I am trying to code a stats hack, but whenever I convert the minerals to a char so I cna print them to the screen, SC crashes. here is my code:
    PHP Code:
    int thr2[500];
    void DrawGas()
    {
        
    __asm
        
    {
            
    mov ecx57F108h
            mov ecx
    dword ptr [ecx]
            
    mov PlayerGas1ecx
        
    }
        
    sprintf(thr2"%s", (char)PlayerGas1);
        
    DrawStaticText(thr21750);

    Any ideas? Thanks

  2. #2
    Master Yoshi Senior Member
    Game Hacking Staff
    Moderator

    Blessed
    Zynastor is a name known to all Zynastor is a name known to all Zynastor is a name known to all Zynastor is a name known to all Zynastor is a name known to all Zynastor's Avatar
    Join Date
    Jun 2005
    Location
    Australia
    Posts
    2,352
    Downloads
    18
    Uploads
    1

    Use "%d"

  3. #3

    Heretic
    c4tAc0mB is on a distinguished road
    Join Date
    Oct 2007
    Posts
    33
    Downloads
    0
    Uploads
    0

    Thanks

  4. #4
    Programmer/PC Enthusiast Game Hacking Staff
    Gold Member

    Enlightened
    AgentGOD is just really nice AgentGOD is just really nice AgentGOD's Avatar
    Join Date
    Jul 2004
    Location
    127.0.0.1
    Posts
    2,560
    Downloads
    6
    Uploads
    9

    Your code needs a lot of cleaning up to do. It looks a little rough, imo.

    Here's a quick fixup:
    Code:
    static char fmtResources[100];
    void DrawGas() {
        PlayerGas1 = *(int*)0x57F108;
        sprintf(fmtResources, "%d", PlayerGas1);
        DrawStaticText(fmtResources, 17, 50);
    }
    #EDIT:
    Can even condense that to this:
    Code:
    void DrawGas() {
    	static char fmtResources[100];
    	sprintf(fmtResources, "%d", *(int*)0x57F108);
    	DrawStaticText(fmtResources, 17, 50);
    }
    Case: Antec Nine Hundred
    CPU: Intel C2Q Q9650 @ 4.0 GHz (9x445), 1.31v [IntelBurnTest stable]
    GPU/Monitor: Visiontek HD 4870 X2 @ 800 MHz/4000 MHz +SyncMaster245BW 24"
    Motherboard: ASUS P5Q Deluxe (BIOS 2005)
    Memory: 8 GB (4x 2 GB) OCZ Reaper HPC DDR2 1066 @ 1069 MHz
    Hard Drive: 2x Seagate 500 GB 7200.11 (Matrix RAID) + 1x WD Caviar Black 640 GB
    Sound: Creative SB X-Fi Fatal1ty Pro
    PSU: OCZ GameXStream 700W
    O/S: Vista Ultimate X64 SP2

    Download Apocalypse v4.02 here!
    Download EliteControl here!

  5. #5

    Heretic
    c4tAc0mB is on a distinguished road
    Join Date
    Oct 2007
    Posts
    33
    Downloads
    0
    Uploads
    0

    Thanks again, that is much simpler. I am going to shoove it all into a 2D structure

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. [Starcraft] Real-time Ownage Hack v5.187
    By AgentGOD in forum Old downloads
    Replies: 96
    Last Post: 12-01-2007, 07:09 AM
  2. [Starcraft] Real-time Ownage Hack v5.18.2
    By AgentGOD in forum Old downloads
    Replies: 57
    Last Post: 09-08-2007, 12:39 AM
  3. [Starcraft] Real-time Ownage Hack v5.11
    By AgentGOD in forum Old downloads
    Replies: 19
    Last Post: 08-06-2007, 10:50 PM
  4. [StarCraft] Real-time Ownage Hack v5.09
    By AgentGOD in forum Old downloads
    Replies: 49
    Last Post: 07-28-2007, 12:10 PM
  5. [Starcraft] Real-time Ownage Hack v5.04
    By AgentGOD in forum Old downloads
    Replies: 63
    Last Post: 07-06-2007, 08:23 PM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts