DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Tutorial] Making an Infinite Ammo Cheat
Page 1 of 1
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 06 Apr 2019

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sat Dec 25, 2004 4:35 pm
   Subject: [Tutorial] Making an Infinite Ammo Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Hello, this tutorial is for the people who like to cheat a lot with Debug Keys to be able to keep their ammo forever without having to do Tab+I.

This is very simple to do and takes no knowledge Wink

Let's get started.

Open up WL_DEF.H
Locate this:
::: CODE :::
extern   boolean      singlestep,godmode,noclip;


Add this to the end:

::: CODE :::
extern   boolean      singlestep,godmode,noclip,infammo;


Open up WL_DEBUG.C
Locate LOCAL VARIBLES
Underneath it, add:

::: CODE :::
boolean infammo;


Now goto the DebugKeys function (int DebugKeys(void)
Add this block after int level,i;

::: CODE :::
if (Keyboard[sc_A])
{
    CenterWindow(18,3);
    if(!infammo)
    {
           US_PrintCentered("Infinite Ammo ON");
           infammo = 1;
    }
    else
    {
            US_PrintCentered("Infinite Ammo OFF");
            infammo = 0;
    }
    VW_UpdateScreen();
    IN_Ack();
    return 1;
}


Modify (if exists):
::: CODE :::
if(Keyboard[sc_B])

to
::: CODE :::
else if (Keyboard[sc_B])


Compile WL_DEBUG.C

Now open up WL_AGENT.C
and locate this block in the T_Attack function:
::: CODE :::
case 1:
         if (!gamestate.ammo)
         {   // can only happen with chain gun
            gamestate.attackframe++;
            break;
         }
         GunAttack (ob);
         gamestate.ammo--;
         DrawAmmo ();
         break;


Modify it to this:

::: CODE :::
case 1:
if (!gamestate.ammo)
{   // can only happen with chain gun
     gamestate.attackframe++;
     break;
}
GunAttack (ob);
if(!infammo)
     gamestate.ammo--;
DrawAmmo ();
break;


Compile WL_AGENT.C and link up, there should be no errors and when the cheat is turned on, the ammo should not go down at all.
If you have any problems with this code of any sort, please feel free to PM me or email me or even post them here.

~Kyle

_________________
Steam: http://steamcommunity.com/id/stormx312


Last edited by KyleRTCW on Sun Dec 26, 2004 10:29 am; edited 1 time in total
Guest




Last Visit:





PostPosted: Sat Dec 25, 2004 10:23 pm
   Subject: Re: [Tutorial] Making an Infinite Ammo Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Don't forget, you also need to put this in WL_AGENT.C

Find this block at the top of the file and add the blue line:

::: CODE :::


/*
======================================

    GLOBAL VARIABLES

======================================
*/



//
// player state info
//
extern boolean infammo;


Oh, and you don't have to add this fix-up in the player state info section if you don't want to, it's just more of an ease-to-read thing.
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 5:23 ago.

Topics: 108
Posts: 1708
Location: A hole in the wall
australia.gif

PostPosted: Sun Dec 26, 2004 2:54 am
   Subject: Re: [Tutorial] Making an Infinite Ammo Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@ KyleRTCW: You've done a fair few awesome code tutorials, including this one. Alot of your stuff really helps me learn c++. Thanks.

_________________
WolfSource - Your news source since the beginning of time (2019)
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 06 Apr 2019

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Sun Dec 26, 2004 10:23 am
   Subject: Re: [Tutorial] Making an Infinite Ammo Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks Darkheaven 3, yeah I see there was a problem with do this when you do MAKE, I'm going to update the tutorial.
You can also put it in WL_DEF to make it global to all files.

@ Deathshead:
Thanks, I'm glad I'm helping someone Smile

_________________
Steam: http://steamcommunity.com/id/stormx312
Guest




Last Visit:





PostPosted: Mon Dec 27, 2004 7:22 pm
   Subject: Re: [Tutorial] Making an Infinite Ammo Cheat
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Well that is true, but in theory it might take up less data bytes to just have it local in WL_AGENT.C... or maybe that's just me...
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Blood Splatz Tutorial - Blood Splatters
Author: Dugtrio17
45 16601 Tue Mar 11, 2008 12:02 am
AlumiuN View latest post
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 3267 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Adding a Frames per Second Counter - Darkone
Author: BrotherTank
0 2405 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 2704 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 3617 Sun Oct 26, 2003 1:21 am
Guest View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group