[mod_sa] NoSpread

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
Code:
void cheat_handle_spread() 
{ 
    static int action = 0;  
     if(cheat_state->_generic.spread == 1 && action == 0)  
     { 
      
      *(float *)13157456 = 5.0; // WEAPON_COLT45 
      *(float *)13157568 = 5.0; // WEAPON_SILENCED 
      *(float *)13157680 = 5.0; // WEAPON_DEAGLE 
      *(float *)13157792 = 5.0; // WEAPON_SHOTGUN 
      *(float *)13157904 = 5.0; // WEAPON_SHAWNEDOFF 
      *(float *)13158016 = 5.0; // WEAPON_SHOTGSPA 
      *(float *)13158128 = 5.0; // WEAPON_UZI 
      *(float *)13158240 = 5.0; // WEAPON_MP5 
      *(float *)13158352 = 5.0; // WEAPON_AK47 
      *(float *)13158464 = 5.0; // WEAPON_M4 
      *(float *)13158576 = 5.0; // WEAPON_TEC9 
      action = 1; 
     } 
    if(cheat_state->_generic.spread == 0 && action == 1)  
    { 
     *(float *)13157456 = 0.8; 
     *(float *)13157568 = 0.8; 
     *(float *)13157680 = 0.8; 
     *(float *)13157792 = 0.8; 
     *(float *)13157904 = 0.8; 
     *(float *)13158016 = 0.8; 
     *(float *)13158128 = 0.8; 
     *(float *)13158240 = 0.8; 
     *(float *)13158352 = 0.8; 
     *(float *)13158464 = 0.8; 
     *(float *)13158576 = 0.8; 
     action = 0; 
     cheat_state->_generic.spread = 0; 
    } 
}
This is the core code, you will still need to make some defines to make it compile-able in mod_sa source.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
It's a shit way since every weapon has a different spread value.
Easier way,

Code:
if (bRecoil)
    memcpy_s((void*)0x740676, "x90\x90\x90", 3);
else
    memcpy_s((void*)0x740676, "xD9\x58\x2C", 3);

or somewhere it's called every ms

Code:
if (bRecoil)
    *(FLOAT*)0xB7CDC8 = 0.0f;

Also when you copy/paste codez or snippets do provide credits to author/source, it's common sense.
 

T3KTONIT

Well-known member
Joined
Sep 2, 2013
Messages
308
Reaction score
5
never fucking write addresses in decimal form, OMG dude i'm gonna kill you  :angry:

ANNOYING!!!.
 
P

pa0neix

Guest
Thanks for the Post  :urtheman:
Someone can share rapidfire, just code, not for mod_s0beit ??  AND NOT DECIMAL!  :red_eyes:  :table_flip:
 

0B36

Expert
Joined
Jan 6, 2014
Messages
1,324
Reaction score
8
T3K link said:
never fucking write addresses in decimal form, OMG dude i'm gonna kill you  :angry:

ANNOYING!!!.

come at me dude  :challenge_accepted:  :challenge_completed:

here u go - http://www.binaryhexconverter.com/decimal-to-hex-converter
 
Top