Page 3 of 3 FirstFirst 123
Results 31 to 35 of 35
  1. #31
    cubanelite's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    192.168.1.1
    Posts
    138
    Reputation
    81
    Thanks
    113
    My Mood
    Hungover
    Quote Originally Posted by GodDamnFrank View Post
    Weird as shit but it works.

    Edit: The bDataCompare function is detected.
    I had to comment it out because it was getting my base detected after 5 mins.
    The bDataCompare function is most certainly Not detected. I played a few games of qr earlier with it fine?



    Quote Originally Posted by Saltine View Post

    You can easily condense this algorithm to:
    Code:
    if (Hack && InGame())
              memcpy(address, PatchBytes, Size);
          else
              memcpy(address, OriginalBytes , Size);
    Or, why not try some ternary operators
    Code:
    (Hack && InGame())?memcpy(address, PatchBytes, Size):memcpy(address, OriginalBytes , Size);
    The code written by the OP of this thread made me want to cry it was so inefficient. Function calls are pretty expensive, and he made TONS of unnecessary ones. At the beginning of each frame, cache the result of the InGame call to a variable, and then use that.
    Code:
    //gobals
    bool statusCache;
    
    //top of present
    
    statusCache = InGame();
    
    //then for accessing it
    if (Hack && statusCache)
              memcpy(address, PatchBytes, Size);
          else
              memcpy(address, OriginalBytes , Size);
    This would save lots of resource usage over time.
    I'm no good at making my code really clean. I've been working on making my coding cleaner, and more efficient for my next release. Thank you for the help! It means alot.
    Last edited by cubanelite; 06-04-2012 at 11:44 PM.
    If you have any questions, PM Me. I always check them.
    PEACE, HOMIES!

  2. #32
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    124
    if you want efficent code use asm
    clean code is not the same as efficient code
    Way she fuckin goes boys

  3. #33
    cubanelite's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    192.168.1.1
    Posts
    138
    Reputation
    81
    Thanks
    113
    My Mood
    Hungover
    Quote Originally Posted by kibbles18 View Post
    if you want efficent code use asm
    clean code is not the same as efficient code
    asm isn't one of my strongest languages... and, I said, and I quote: "making my coding cleaner, and more efficient"
    If you have any questions, PM Me. I always check them.
    PEACE, HOMIES!

  4. #34
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    494
    Reputation
    104
    Thanks
    625
    Quote Originally Posted by kibbles18 View Post
    if you want efficent code use asm
    clean code is not the same as efficient code
    asm is only efficient in the right hands. Someone who doesn't know what they are doing will often write an algorithm slower than one that they would have written in native C. And yes, clean != efficient. One example is packing all of your code into one main method. It looks horrible, but in the end, it saves resources due to reducing function calls.

    Oh no! Vortex is gay!

  5. #35
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,706
    Reputation
    907
    Thanks
    7,295
    My Mood
    Mellow
    Quote Originally Posted by Saltine View Post

    Or, why not try some ternary operators
    Code:
    (Hack && InGame())?memcpy(address, PatchBytes, Size):memcpy(address, OriginalBytes , Size);
    Why make things more difficult to read? Either way you're calling memcpy:
    Code:
    memcpy(address, (Hack && InGame() ? PatchBytes : OriginalBytes), Size);
    And Proper-Cased variables names? Yuk.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

Page 3 of 3 FirstFirst 123

Similar Threads

  1. [Help Request] Crash help
    By demonicskill in forum Piercing Blow Help
    Replies: 3
    Last Post: 12-06-2011, 08:38 AM
  2. [Help Request] Combat Arms Crashing! Help!
    By Opk4Life in forum Combat Arms Help
    Replies: 9
    Last Post: 08-26-2011, 05:40 AM
  3. CA HACKS CRASHING *HELP*
    By 123east in forum Combat Arms Help
    Replies: 12
    Last Post: 06-17-2010, 10:33 AM
  4. i think my ca crashed help me
    By flayer669 in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 05-30-2009, 07:58 PM
  5. Warrock Crash Help Needed
    By Jeckels in forum WarRock - International Hacks
    Replies: 14
    Last Post: 07-18-2007, 11:44 PM