(Old code tutorial) Cheat System from Team Aardwolf Forums

Go down

(Old code tutorial) Cheat System from Team Aardwolf Forums Empty (Old code tutorial) Cheat System from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Sat Apr 23, 2016 9:08 am

Well, I decided to post some of my tutorials here...
Okay, this is the first one. In this I teach you how to make new
Cheat-system.

---

I have used WSJ's ingame-message in this tutorial,
they can be found here (just scroll down the page):

http://diehardwolfers.areyep.com/viewtopic.php?t=1795

First open WL_DEF.H and add this somewhere
to the WL_PLAY.C definitions.

Code:

int cheater;

Then open the WL_PLAY.C and go to the "CheckKeys"-function.

Now we shall modify the "M-L-I"-cheat a bit (to make the
cheat-system work but you can make your own letter
combination for the cheats too):

Code:

//
// Activate cheat-system
//
if (Keyboard[sc_M] &&
    Keyboard[sc_L] &&
    Keyboard[sc_I])
{
    GetMessage("Press 'W' for weapons and ammo,\n 'K' for all keys and\n 'H' for full health.");
    cheater = true;

    IN_ClearKeysDown();
}

// Cheats
if (!cheater)
    SD_PlaySound(DONOTHINGSND);
else
{
    if(Keyboard[sc_W]) // ammunition cheat
    {
          GiveWeapon(wp_chaingun);
          gamestate.ammo=99;  

          GetMessage("Weapons and ammo.");
          DrawAmmo();
  
          IN_ClearKeysDown();  
    }
    if(Keyboard[sc_K]) // cheat for keys
    {
            gamestate.keys = 3; // change the value to 15 for four keys            

            GetMessage("All keys acquired.");
            DrawKeys();
  
            IN_ClearKeysDown();
      }
      if(Keyboard[sc_H]) // cheat for life
      {        
            gamestate.health = 100;
            GiveExtraMan();

            GetMessage("Full recovery.");
              
              IN_ClearKeysDown();
      }
}  

Then we must add this red line to the "NewGame"-function
in the WL_MAIN.C (So the debugmode won't be open
when player starts the game):

Code:

cheater = false;

Remember to add this line to the "Died"-funcion
in the WL_GAME.C too (so the cheats will turn of
if player die) and if you want, to the GameLoop function
(it can be find also in the WL_GAME.C).

Writte by WLHack on Sat Jul 28, 2007 12:06 pm
Officer-M. John (Admin)
Officer-M. John (Admin)
Admin

Posts : 422
Join date : 2015-10-02
Age : 21

View user profile http://wolf3dfanboys.forumotion.com

Back to top Go down

(Old code tutorial) Cheat System from Team Aardwolf Forums Empty Re: (Old code tutorial) Cheat System from Team Aardwolf Forums

Post by Vendég on Thu Mar 16, 2017 10:45 pm

Are you a CHEATER? Laughing Laughing Laughing

Vendég
Guest


Back to top Go down

(Old code tutorial) Cheat System from Team Aardwolf Forums Empty Re: (Old code tutorial) Cheat System from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Sun Mar 19, 2017 4:33 pm

I'm not use this code tutorial. If I use cheats it is because I test the mods or very hard is level.
Officer-M. John (Admin)
Officer-M. John (Admin)
Admin

Posts : 422
Join date : 2015-10-02
Age : 21

View user profile http://wolf3dfanboys.forumotion.com

Back to top Go down

(Old code tutorial) Cheat System from Team Aardwolf Forums Empty Re: (Old code tutorial) Cheat System from Team Aardwolf Forums

Post by Vendég on Mon Mar 20, 2017 3:35 pm

Officer-M. John (Admin) wrote:I'm not use this code tutorial. If I use cheats it is because I test the mods or very hard is level.

thats still cheating..... Laughing Laughing

Vendég
Guest


Back to top Go down

(Old code tutorial) Cheat System from Team Aardwolf Forums Empty Re: (Old code tutorial) Cheat System from Team Aardwolf Forums

Post by Officer-M. John (Admin) on Tue Mar 21, 2017 8:17 am

I know. Very Happy
Officer-M. John (Admin)
Officer-M. John (Admin)
Admin

Posts : 422
Join date : 2015-10-02
Age : 21

View user profile http://wolf3dfanboys.forumotion.com

Back to top Go down

(Old code tutorial) Cheat System from Team Aardwolf Forums Empty Re: (Old code tutorial) Cheat System from Team Aardwolf Forums

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum