Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Call of Duty Hacks & Cheats › Call of Duty 7 - Black Ops Hacks & Cheats › Call of Duty Black Ops Coding, Programming & Source Code › Perfect No Spread source code

PostPerfect No Spread source code

Posts 1–9 of 9 · Page 1 of 1
Bris
Bris
Perfect No Spread source code
LEECHED, USED COPY+PASTE SYSTEM!!!

Code:
DWORD _BG_GetWeaponDef = 0x00529FF0;
DWORD _BG_GetSpreadForWeapon = 0x0047DE70;
DWORD _CG_GetPlayerViewOrigin = 0x004E7470;
DWORD _GetSpreadEndVec = 0x007FC040;
DWORD clients = 0x00E67C80; // clientActive_t struct
int* currentCmdNum = 0x00EABEE8;

int GetCurrentWeapon()
{
    return *(short*)((int)cgArray + 263836 + 324); // "Player is holding" string
}

int BG_GetWeaponDef(int weapon)
{
    DWORD result = 0;
    __asm
    {
        push weapon
        _BG_GetWeaponDef
        mov result,eax
        add esp,04h
    }
    return result;
}

void BG_GetSpreadForWeapon(int playerStatePtr, int weaponDefPtr, float* minSpreadOut, float* maxSpreadOut)
{
    // WARNING: Use _fxsave and _fxrstor if your XMM
    // registers screw up
    __asm
    {
        push maxSpreadOut
        push minSpreadOut
        push weaponDefPtr
        push playerStatePtr
        call _BG_GetSpreadForWeapon
        add esp,10h
    }
}

int CG_GetPlayerViewOrigin(int localClientNum, int playerStatePtr, pvec3_t vecOut)
{
    DWORD result = 0;
    __asm
    {
        push vecOut
        push playerStatePtr
        push localClientNum
        call _CG_GetPlayerViewOrigin
        mov result,eax
        add esp,0Ch
    }
    return result;
}

void GetSpreadEndVec(pvec3_t viewOrigin, pvec3_t spreadEndVecOut, float spread, int commandTime, pvec3_t spreadDirectionOut, pvec3_t forward, pvec3_t right, pvec3_t up, float range)
{
    __asm
    {
        push range
        push up
        push right
        push forward
        push spreadDirectionOut
        push commandTime
        movss xmm0,spread
        mov esi,spreadEndVecOut
        mov edi,viewOrigin
        call _GetSpreadEndVec
        add esp,18h
    }
}

usercmd_s* CL_GetUserCmd(int cmdNum)
{
    return (usercmd_s*)((int)clients + 272488 + sizeof(usercmd_s) * (cmdNum & 0x7F));
}

int CL_GetCurrentCmdNumber()
{
    return *currentCmdNum;
}

void NoSpread()
{
    // get playerState_s struct
    int playerStatePtr = (int)cgArray + 263836;

    // get weaponDef struct and our starting spread float value
    float spread;
    int weaponDefPtr = BG_GetWeaponDef(GetCurrentWeapon());
    spread = *(float*)((int)cgArray + 457488) / 255.0f;

    // get final spread float value
    float minSpread, maxSpread;
    BG_GetSpreadForWeapon(playerStatePtr, weaponDefPtr, &minSpread, &maxSpread);
    if (*(float*)(playerStatePtr + 360) == 1.0f) // if (fWeaponPosFrac == 1.0f) get minSpread from weaponDef
        spread = *(float*)(weaponDefPtr + 1736) + ((maxSpread - *(float*)(weaponDefPtr + 1736)) * spread);
    else
        spread = minSpread + ((maxSpread - minSpread) * spread);

    // get our view origin
    vec3_t viewOrigin;
    if (!CG_GetPlayerViewOrigin(0, playerStatePtr, viewOrigin))
        return;

    // get our view axis
    vec3_t viewAngles;
    vec3_t viewAxis[3];
    if (*(int*)((int)cgArray + 263832)) // renderingThirdPerson
    {
        AngleVectors((float*)((int)cgArray + 390792 + sizeof(clientInfo_t) * cgArray->clientNum), viewAxis[0], viewAxis[1], viewAxis[2]);
    }
    else
    {
        viewAngles[0] = *(float*)((int)cgArray + 389012);
        viewAngles[1] = *(float*)((int)cgArray + 389016);
        viewAngles[2] = 0;
        AngleVectors(viewAngles, viewAxis[0], viewAxis[1], viewAxis[2]);
    }

    // get the range
    float range;
    if (*(int*)(weaponDefPtr + 32) == 3) // if (weapClass == WEAPCLASS_SPREAD)
        range = *(float*)(weaponDefPtr + 1964); // range = fMinDamageRange; (probably for shotguns)
    else
        range = 8192.0f; // from bulletrange dvar

    // NOTE: you can't do 100% no spread with shotguns, because you can only fix 1 bullet at a time

    // get the end vector in the game world of the spread and the direction vector too
    // we use the direction vector directly instead of the end vector
    vec3_t spreadEndVec;
    vec3_t spreadDirection;
    GetSpreadEndVec(viewOrigin, spreadEndVec, spread, *(int*)playerStatePtr, spreadDirection, viewAxis[0], viewAxis[1], viewAxis[2], range);
    
    // convert the spread direction to angles
    vectoangles(spreadDirection, viewAngles);
    
    // fix our angles
    usercmd_s* oldcmd = CL_GetUserCmd(CL_GetCurrentCmdNumber() - 1);

    // get the angle delta and write it to the user cmd
    // do -= because we want to get the inverse of the spread
    oldcmd->angles[0] -= ANGLE2SHORT(-(*(float*)((int)cgArray + 389012) - viewAngles[0]));
    oldcmd->angles[1] -= ANGLE2SHORT(-(*(float*)((int)cgArray + 389016) - viewAngles[1]));

    oldcmd->serverTime += 1;
}
Author says that you're doing something wrong if your no spread isn't as accurate as this:


ALL CREDITS GOES TO kokole!!!
__________________________________________________ ___________
Guys, I don't know if it's working so use with causion. Also, as I'm total noob, I should compile this code into .dll file and inject into game process?
#1 · 12y ago
LO
Lovroman
Yes, but if you compile this, you won't get working DLL(because code doesn't contain DLLMain and other stuff needed to enable nospread).
#2 · 12y ago
Bris
Bris
Quote Originally Posted by Lovroman View Post
Yes, but if you compile this, you won't get working DLL(because code doesn't contain DLLMain and other stuff needed to enable nospread).
Well, still thanks for answer. So, as I told before, I'm a total noob
So, could you or someone else actually compile it (and make it work) for cocksuckin' leechers like me?
#3 · 12y ago
Bris
Bris
@bumping my question, god dammit

Quote Originally Posted by Bris View Post
So, could you or someone else actually compile it (and make it work) for cocksuckin' leechers like me?
#4 · 12y ago
TheRealReverse
TheRealReverse
Well I am also a noob, but I really want to get into this kind of stuff... But I just want to know something... What the hell am I supposed to do with this code? Like where do I put it? I have done coding before and I know how, but I just don't know where this goes. Sorry :P
#5 · 12y ago
LO
Lovroman
Quote Originally Posted by TheRealReverse View Post
Well I am also a noob, but I really want to get into this kind of stuff... But I just want to know something... What the hell am I supposed to do with this code? Like where do I put it? I have done coding before and I know how, but I just don't know where this goes. Sorry :P
You can put it in a .CPP file.
You'll need a hook(one of most used functions for silent aims & nospreads is CG_WritePacket)
So you'll have to find address of CG_WritePacket and that stuff..
#6 · 12y ago
Geneduty98
Geneduty98
So Can Any One Make That No Spread Please?
I Have No Idea How To Creat That.!
#7 · 12y ago
Horror
Horror
Quote Originally Posted by Geneduty98 View Post
I Have No Idea How To Creat That.!
Then just wait.
#8 · 12y ago
Geneduty98
Geneduty98
ok please and thank u.....sorry for ads
#9 · 12y ago
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

  • What is the source code od super no spread?By nikkeight in WarRock Hack Source Code
    1Last post 14y ago
  • HALO 2 (XBOX) Source CodeBy mirelesmichael in General Game Hacking
    12Last post 20y ago
  • Fixing your spread/ recoil code!!By boom.. in WarRock - International Hacks
    7Last post 19y ago
  • [Release] WarHax DLL Source CodeBy OneWhoSighs in WarRock - International Hacks
    20Last post 18y ago
  • keylogger source codeBy obsedianpk in WarRock - International Hacks
    8Last post 18y ago

Tags for this Thread

None