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 6 - Modern Warfare 2 (MW2) Hacks › Call of Duty Modern Warfare 2 Coding / Programming / Source Code › [Delphi] MW2 Text Cycle Effect

Cool[Delphi] MW2 Text Cycle Effect

Posts 1–7 of 7 · Page 1 of 1
0rbit
0rbit
[Delphi] MW2 Text Cycle Effect
Hey all. Recently coded this up just to see if I could. Well I could, so here ya go:

Code:
procedure mw2Cycle(Canvas:TCanvas;s:string;PosX,PosY,TimePerChar:Integer;bgCol:TColor;Font:TFont);
var
  i,j:integer;
  om:integer;
  output,r:string;
label
  m;
begin
  canvas.Font:=Font;
  if s='' then s:='Lol why so blank?';
  r:='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !"£$%^&*()-_=+{[}]:;@''~#?/>.<,|\¬`¦ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜøØ׃áíóúñѪº¿®½¼¡«»ÁÂÀ©¢¥ãäðÐÌÓßÔÒõյþÞÞÚÛÙýݯ´±=¾¶§¸¨·¹³²°†‡•…‰™';
  output:=' ';
  om:=1;
  m:

  i:=1;
  while (i<TimePerChar) Do
  begin
     Application.ProcessMessages;
     Randomize;
     j:=RandomRange(1,Length(r));
     output[om]:=r[j];

     With Canvas do begin
      Brush.Color:=bgCol;
      fillrect(cliprect);
      Bru******yle:=bsClear;
      TextOut(PosX,PosY,output);
     end;

     inc(i);
  end;

  output[om]:=s[om];
  With Canvas do begin
   Brush.Color:=bgCol;
   fillrect(cliprect);
   Bru******yle:=bsClear;
   TextOut(PosX,PosY,output);
  end;

  if Length(s)<>Length(output) then
  begin
   output[om]:=s[om];
   output:=output+' ';
   Inc(om);
   goto m;
  end;

end;
Example call:
mw2Cycle(Image1.Canvas,'Modern Warfare 2',0,0,200,clBlack,f);

(Where "f" is a TFont which has already been created).

The above gives the effect seen in text when you, for example, complete a challenge in-game, with the cycling text.

Now, this is a "big" version which can be cut down easily (ie. You could just pass the Canvas and string, hardcoding the rest in the procedure).

Okay, explaining time (for anyone who wishes to convert this to another language for example).

Basic idea behind this:
  • Have input / output / constant strings
  • The final output = input
  • In between, however, the output will contain random characters, selected from our constant string
  • Once the time has run out for the first character (eg. 2 seconds), we set it to the correct value (from the input), and move on to the next one. Repeat until output=input

"r" is out Constant String variable, which is used for holding our random characters. It contains all the characters we could need (A-Z,a-z,0-9,"Regular" Symbols), and many, many other ASCII characters. These extra characters may never be used by someone using the procedure, however they look good as they shoot past

We start by giving output (a string variable) a value of a space. This gives us a base to work from as we'll be referencing the characters like output[i]. If output was left blank this would cause problems.

Next we do our loop for the first character. The loop is repeated until the time is complete (eg. 2 seconds). We select a random character from "r", and set output's first character to this. We then print this character. For the whole 2 seconds we do this over and over again. Once the time is up, we set the character to its correct value, and print it.

Next we check if length of output=length of input. If it is, we're done. Otherwise we add a space to output, and go back to the label m (think of a jne in asm). Just below m is our loop. The loop is done again, this time for the next character. This paragraph is repeated until length of output = length of input. Once it is, we're done.

So yeah, that's basically it. I've attached a demo .exe to show what this does when the procedure is called, allowing you to change the font/colours/speed. Don't dream of setting speed to like...90 or you'll be sitting there for days (Someone learned this the hard way )
Coders: Note that in this demo the speed (timePerChar) entered by the user is multiplied by 100 before use. Default is 2, so the procedure's "default" would be 200. The credits is called with a value of 100.

If you don't understand anything here or need help, feel free to ask. I don't bite...usually



I know this isn't exactly CoD development, but there isn't a Delphi section, and this would be more appreciated by people in the CoD programming section than those in "Other Programming" in my opinion, so I've posted it here for CoD people to see Sorry if I'm wrong.


Virus Scans for the Demo:
VirusTotal: 0/39 (0%)
VirScan.org: Scanners did not find malware!

Screenshot here.

Enjoy!
- 0rbit
#1 · edited 16y ago · 16y ago
Abstract
Abstract
Upload the image to imageshack, this isnt a image hosting page
#2 · 16y ago
0rbit
0rbit
That okay for you now, sire?
#3 · 16y ago
EN
[MPGH]EndRiT
File approved.
#4 · 16y ago
1O
1OneShot
just tell me please how to use it?
put that code in _rank.gsc?
#5 · 16y ago
0rbit
0rbit
Quote Originally Posted by 1OneShot View Post
just tell me please how to use it?
put that code in _rank.gsc?
No, this is Delphi code (for an EXE). It's not for MW2 itsself.
#6 · 16y ago
PA
parkerman111
thx, that helped
#7 · 16y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • [HELP!] MW2 text issue!By asdf12345678 in Suggestions, Requests & General Help
    1Last post 16y ago
  • PREVIEW MW2 MAP sound effectsBy jflash in Combat Arms Mod Discussion
    6Last post 15y ago
  • MW2-Style TextBy edub18 in Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    0Last post 15y ago
  • COD MW2 Hit EffectsBy jflash in Combat Arms Mod Request
    4Last post 15y ago
  • Cool blue text effectBy dav96cool in Tutorials
    2Last post 16y ago

Tags for this Thread

#0rbit#cycle#delphi#mw2#text