Far Cry

Platform

zScore

89%

Far Cry

Developer:Crytek Studios Genre:Action Release Date: Download Games Free Now!

About The Game

The game begins under mysterious circumstances where main character John Carver finds himself tied to a chair in the empty, rusted belly of a decrepit cargo ship. Thanks to the help of an unseen stranger, John's restraints are loosened and he sets out to escape his captors. From this point on you are in control of John's destiny. Far Cry offers a variety of ways to approach each challenging situation, where players can choose to rely on firepower, strategy and stealth. An amazing new game engine (the CryENGINE) features breathtaking graphics, highly intelligent computer AI, and a host of other visual effects and technological advancements.

+Downloadwalkthrough14.1 KB
Far Cry

Far Cry Review

By Jeremy Vancleave |

Even games with the best of intentions come and go, if they fall short in a couple key areas, to be eventually shuffled off to the graveyard of industry footnotes. A new graphical innovation here, a good sense of humor there, but something just doesn't gel. With Far Cry, however, you can see so many places where things could have gone wrong, but didn't. The AI could easily have been blindly aggressive or stone deaf. The load times could have been constant and distracting. In almost all major areas, Far Cry manages to walk the tightrope of game design over a chasm of Things Gone Wrong. I've always wondered why no one apparently tried to license the AI of the Marines in Half-Life, because after that, I was always a little bit disappointed with the FPSs that came after. And finally someone has answered the call and the creatures here are actually smart.

It's not all wine and roses, though. It's important to keep in mind that this game is meant to push your rig to its limit. My home system is a 2.4GHz P4 with 512MB of RAM and a 9700 Pro, and while this has been more than enough for 99% of the games I've played on, with all the details cranked up, it's not the case here. I need the full power of the Alienware rig at work, a 3.0GHz P4 with a gigabyte of RAM and a 9800 Pro. The deciding factor seems to be the extra RAM and CPU horsepower, as I can run everything on Very High on this machine, but the home rig has to do Medium and High on most options. However, the many graphical options provide plenty of flexibility. You can't ratchet down view distance, but you can tone down things like dynamic lighting, water effects, and shadows. The game will only load once for each of the enormous areas, and it takes about a minute, but reloading from a save game after dying only takes a few seconds. The system with a gigabyte of RAM did both operations noticeably quicker.

With that said, Far Cry can be an incredibly beautiful game. From the 1-kilometer view distance, to the almost-overflowing foliage, lighting and more, this game is a bullet point list of things you'd want a game to be able to do. I'm very pleased to say, though, that it's more than just a glorified tech demo. It creates a continuous strategic and tactical challenge while wowing my eyeballs with next-generation bells and whistles. There is some clipping--it seems to be unavoidable in a 3D engine--and textures at a distance scale down noticeably even with everything maxed out. Also, you'll sometimes see long-range targets fade in as you get close to them. Lastly, lowering some of the graphical settings for the environment can produce foliage popping, where a bush will start out as a flat, basic texture, then sort of spring into a full-fledged, high-detail image as you get close to it. However, the smallest (and most numerous) foliage objects would fade into view as you may have seen in PlanetSide, which is much more transparent for the player.

Sound isn't too shabby either--especially when playing with headphones, where the ambient music really comes to the fore to develop mood. You can turn music off, but you'd be missing out. It adapts to the action, and each area has a subtly different theme. Some of it is standard action movie fare, but there's also plenty of effective ambient spookiness to go around. However, the later cutscenes in the game had dialogue that seemed a second or two off from the on-screen action.

Far Cry Cheats

Press '~' to bring up the console and enter these codes:

  • archive level : map archive
  • boat level: map boat
  • bunker level: map bunker
  • carrier level: map carrier
  • catacombs level: map catacombs
  • control level: map control
  • cooler level: map cooler
  • dam level: map dam
  • factory level: map factory
  • fort level: map fort
  • pier level: map pier
  • rebellion level: map rebellion
  • regulator level: map regulator
  • research level: map research
  • river level: map river
  • steam level: map steam
  • swamp level: map swamp
  • training level: map training
  • treehouse level: map treehouse
  • volcano level: map volcano

This involves editting a vital game file, so make a back up of the original file before you attempt the following hack.

Locate the DevMode.lua file in your Far Cry directory. Use a text editor (like Notepad.exe) to open the file and copy all the following contents into the DevMode.lua file (replace all the original contents). Save it as a .lua file when you are done.

cl_display_hud = 1 cl_drunken_cam = 0 ThirdPersonView = 0 --p_model = "objects/characters/pmodels/hero/hero.cgf" --Input:BindCommandToKey('#Movie:StopAllCutScenes()',"F7",1); --Input:BindCommandToKey("SkipCutScene","F7",1); -- Developer Cheat keys --- --- non standard key bindings --- -- Please NEWER use F9,F10 keys (reserved for debug purposes) (Vlad) --Input:BindCommandToKey("#SwitchCameraMode()","f1",1); -- Input:BindCommandToKey("#r_GetScreenShot=1","f12",1); -- this is now bindable Input:BindCommandToKey("#ToggleAIInfo()","f11",1); --Input:BindCommandToKey("#ToggleScreenshotMode()","f11",1); Input:BindCommandToKey("#ToggleNewDesignerMode(10,15,0)","f4",1); -- to be removed Input:BindCommandToKey("#GotoNextSpawnpoint()","f2",1); Input:BindCommandToKey("#MoreAmmo()","o",1); Input:BindCommandToKey("#AllWeapons()","p",1); Input:BindAction("SAVEPOS", "f9", "default"); Input:BindAction("LOADPOS", "f10", "default"); Input:BindCommandToKey("#ToggleNewDesignerMode(40,120,1)","f3",1); Input:BindCommandToKey("#System:ShowDebugger();", "f8", 1); -- to be removed -- removed --Input:BindCommandToKey("#Game.Save()","insert",1); --Input:BindCommandToKey("#Game.Load()","home",1); Input:BindCommandToKey("#DefaultSpeed()","f5",1); Input:BindCommandToKey("#DecreseSpeed()","-",1); Input:BindCommandToKey("#IncreseSpeed()","=",1); --Input:BindCommandToKey("#p_single_step_mode=1-p_single_step_mode","[",1); --Input:BindCommandToKey("#p_do_step=1","]",1); --Input:BindCommandToKey("#TCM()",".",1); --Input:BindCommandToKey("#e_hires_screenshoot=4","f10",1); -- removed --- temp variables for functions below --- prev_speed_walk=p_speed_walk; prev_speed_run=p_speed_run; prev_speed_walk2=p_speed_walk; prev_speed_run2=p_speed_run; default_speed_walk=p_speed_walk; default_speed_run=p_speed_run; screenshotmode=0; function ToggleAIInfo() if (not aiinfo) then aiinfo=1; else aiinfo=1-aiinfo; end if (aiinfo==1) then ai_debugdraw=1; ai_drawplayernode=1; ai_area_info=1; else ai_debugdraw=0; ai_drawplayernode=0; ai_area_info=0; end end function GotoNextSpawnpoint() Hud:AddMessage("[NEXT]: next spawn point"); local pt; pt=Server:GetNextRespawnPoint(); if(not pt)then -- last respawn point or there are no respawn points pt=Server:GetFirstRespawnPoint(); -- try to get the first one end if(pt)then -- if there is one Game:ForceEntitiesToSleep(); _localplayer:SetPos(pt); _localplayer:SetAngles({ x = pt.xA, y = pt.yA, z = pt.zA }); end end function SetPlayerPos() local p=_localplayer p:SetPos({x=100,y=100,z=300}); end -- replacement for ToggleSuperDesignerMode() and ToggleDesignerMode() -- -- USAGE: -- deactivate designer mode: (nil,nil,0) -- old super designer mode (with collision): (40,120,1) -- old designer mode (without collision): (10,15,0) -- change values: call with (nil,nil,0) then with the new values (0.., 0.., 0/1) -- function ToggleNewDesignerMode( speedwalk, speedrun, withcollide ) if(SuperDesignerMode_Save1~=nil or speedwalk==nil) then Hud:AddMessage("[CHEAT]: Designer fly mode OFF"); p_speed_walk = SuperDesignerMode_Save1; p_speed_run = SuperDesignerMode_Save2; _localplayer.DynProp.gravity = SuperDesignerMode_Save3; _localplayer.DynProp.inertia = SuperDesignerMode_Save4; _localplayer.DynProp.swimming_gravity = SuperDesignerMode_Save5; _localplayer.DynProp.swimming_inertia = SuperDesignerMode_Save6; _localplayer.DynProp.air_control = SuperDesignerMode_Save7; _localplayer.cnt:SetDynamicsProperties( _localplayer.DynProp ); SuperDesignerMode_Save1=nil; -- activate collision, parameter is 0 or 1 _localplayer:ActivatePhysics(1); else Hud:AddMessage("[CHEAT]: Designer fly mode ON"); SuperDesignerMode_Save1 = p_speed_walk; SuperDesignerMode_Save2 = p_speed_run; SuperDesignerMode_Save3 = _localplayer.DynProp.gravity; SuperDesignerMode_Save4 = _localplayer.DynProp.inertia; SuperDesignerMode_Save5 = _localplayer.DynProp.swimming_gravity; SuperDesignerMode_Save6 = _localplayer.DynProp.swimming_inertia; SuperDesignerMode_Save7 = _localplayer.DynProp.air_control; p_speed_walk = speedwalk; p_speed_run = speedrun; _localplayer.DynProp.gravity=0.0; _localplayer.DynProp.inertia=0.0; _localplayer.DynProp.swimming_gravity=0.0; _localplayer.DynProp.swimming_inertia=0.0; _localplayer.DynProp.air_control=1.0; _localplayer.cnt:SetDynamicsProperties( _localplayer.DynProp ); -- deactivate collision, parameter is 0 or 1 _localplayer:ActivatePhysics(withcollide); end end function ToggleScreenshotMode() if(screenshotmode~=0) then System:LogToConsole ("SCREENSHOTMODE OFF-->SWITCH TO NORMAL"); screenshotmode=0; hud_crosshair = "1" cl_display_hud = "1" r_NoDrawNear = "0" ai_ignoreplayer = "0" ai_soundperception = "1" r_DisplayInfo = "1" else System:LogToConsole("SCREENSHOTMODE ON"); screenshotmode=1; hud_crosshair = "0" cl_display_hud = "0" r_NoDrawNear = "1" ai_ignoreplayer = "1" ai_soundperception = "0" r_DisplayInfo = "0" end end function DecreseSpeed() if tonumber(p_speed_walk)>5 then p_speed_walk=p_speed_walk-5; p_speed_run=p_speed_run-5; System:LogToConsole("Decresed player speed by 5"); else System:LogToConsole("You can not go any slower!"); end end function IncreseSpeed() if tonumber(p_speed_walk)<500 then p_speed_walk=p_speed_walk+5; p_speed_run=p_speed_run+5; System:LogToConsole("Incresed player speed by 5"); else System:LogToConsole("You can not go any faster!"); end end function DefaultSpeed() p_speed_walk=default_speed_walk; p_speed_run=default_speed_run; System:LogToConsole("Player speed reset"); end function TeleportToSpawn(n) local player = _localplayer; local pos = Server:GetRespawnPoint("Respawn"..n); if pos then player:SetPos(pos); player:SetAngles({ x = pos.xA, y = pos.yA, z = pos.zA }); end end -- Give the player the passed weapon, load it if neccesary function AddWeapon(Name) Game:AddWeapon(Name) for i, CurWeapon in WeaponClassesEx do if (i == Name) then _localplayer.cnt:MakeWeaponAvailable(CurWeapon.id); end end end function MoreAmmo() if _localplayer then _localplayer.cnt.ammo=999; Hud:AddMessage("[CHEAT]: Give 999 ammo"); System:LogToConsole("01CHEAT: Give 999 ammo"); else Hud:AddMessage("[CHEAT]: no ammo today"); end end function AllWeapons() AddWeapon("AG36"); AddWeapon("Falcon"); AddWeapon("SniperRifle"); AddWeapon("MP5"); AddWeapon("RL"); AddWeapon("Shotgun"); AddWeapon("OICW"); AddWeapon("P90"); AddWeapon("M4"); _localplayer.cnt:GiveBinoculars(1); _localplayer.cnt:GiveFlashLight(1); Hud:AddMessage("[CHEAT]: Give all weapons"); System:LogToConsole("01CHEAT: Give All weapons"); end function ToggleGod() if (not god) then god=1; else god=1-god; end if (god==1) then System:LogToConsole("God-Mode ON"); else System:LogToConsole("God-Mode OFF"); end end Input:BindCommandToKey("#ToggleGod()","backspace",1);

After you save the DevMode.lua file, start a Far Cry game by adding -devmode at the end of the games's executable and you may use the following hotkeys for cheats:

  • F1 ... Toggles FirstPerson/ThirdPerson Camera Modes
  • F2 ... Go to next checkpoint
  • F4 ... No clipping on/off
  • F5 ... Default Speed
  • F9 ... Save Current Position
  • F10 ... Load Current Position
  • F11 ... Toggle Extra Information
  • o ... Gives 999 ammo
  • p ... Gives all weapons
  • BackSpace ... Toggle GodMode
  • = ... increase speed
  • - ... decrease speed

Far Cry Game Walkthrough

FarCry (PC) DevMode.LUA hack by James Turbyfill

Download file
_______________________________________________________________________________

Basically, I am trying to give everyone this text-file called "DevMode.lua" which I 
improved a lot compared to similar cheats I found on the Internet.  

The file is loaded by the game automatically if it is found in the game's main folder.

Aside from the contents of the file in the FarCry 
directory called "DevMode.lua" there 
are also my personal instructions (assuming the user obtains the LUA file separately and 
then reads these accompanying instructions):

*********************************************************************

(1)   Place this file (DevMode.lua) in the main FarCry folder; but put the original 
      DevMode.lua (also found there) somewhere else for safe keeping. You can rename the 
      original file "DevMode_lua.BAK" for example, and leave it in the same directory.

      ** EDITORS' NOTE ** Your operating system must be allowed for its users to view
                          all files, including system and hidden files, as well as have
                          the file name and extension visible at all times. These options
                          may be accessed in any open folder with the following path:

       TOOLS --> FOLDER OPTIONS --> VIEW (tab)


(2)   Add this launch option to the game's executable: "-DEVMODE"

     ------------------------------------------------
     How to set a Launch Option from a game shortcut:
     ------------------------------------------------

  2-1. Right-click the shortcut that launches the game.

  2-2. Click "Properties".  The Properties window appears.

  2-3. On the Properties window, find the entry for "Target".

  2-4. At the very end of the string shown in the "Target" field, 
       type one space and then type -DEVMODE

  2-5. Click "OK".

     ------------------------------------------------
     How to set a Launch Option within the Steam game client:
     --------------------------------------------------------

  2-1S. Go to your installed Games list within Steam.

  2-2S. Right-click the "Far Cry" item.

  2-3S. Click the menu option "Properties".

  2-4S. On the "General" tab, click "Set Launch Options..."

  2-5S. Type -DEVMODE without spaces.

  2-6S. Click "OK".


(3) Loading the game now enables the following cheats ...

F1   Toggle camera view between 1st and 3rd person (already built-in)
F2   Jump to next spawn-point, on the same level / map
F3   Fast-Fly mode:  Fly very fast, but you can't move through solid objects
F4   No-Clip Fly mode:  Fly, and can move through solid objects
F5   Quick-Save of the game
F8   Quick-Load of the last quick-saved game
F9   Toggle if all enemies are both blind and deaf to your presence
F12  Save a screen-shot image (already built-in)
9    Give the maximum number of every grenade-type
P    Give all weapons (except M4 and machete, because 9 is max). Access all 
     the weapons by scrolling through the mouse-wheel. Drop what you don't want.

Backspace        Toggle god-mode (almost endless health and armor)
0 [numeral zero] Give binoculars, heat-vision goggles, and flashlight
O [letter 'oh']  Give the maximum reserve ammunition for the current weapon and firing mode


*********************************************************************

If the user can only obtain my edited DevMode.lua file by doing a copy-and-paste of text 
they read on the screen, then my instructions would have be slightly different, e.g. 
steps explaining how to copy/paste, create, and name the file they need.  

Also, those instructions are best provided to them entirely as LUA scripting comments (which 
are preceded by "--"), to sidestep the confusion and potential problem of users pasting the 
instructions into the contents of the LUA file.

I copied the instructions I just wrote up here and put them inside of the LUA file itself as 
comments, and I attached a copy of this updated version of the LUA [see attachment].

Let me know what's needed for better instructions – and if the LUA file would be downloaded 
or copy/pasted by the users.


-Jamey

Download DevMode.lua file as ZIP or copy/paste contents below:

_______________________________________________________________________________

START DevMode.LUA Contents 
_______________________________________________________________________________


--System:ExecuteCommand("load_game");           -- note: for executing this script as a console command (e.g. edit script, then re-load game to test script)

cl_display_hud = 1
cl_drunken_cam = 0
ThirdPersonView = 0

Input:BindCommandToKey("#GotoNextSpawnpoint()","f2",1);
Input:BindCommandToKey("#ToggleFastFlyMode()","f3",1);
Input:BindCommandToKey("#ToggleNoClipFlyMode()","f4",1);
--Input:BindCommandToKey("save_game","f5","");        -- How to key-bind a console command
--Input:BindCommandToKey("load_game","f8","");        -- How to key-bind a console command
Input:BindCommandToKey("#QuickSave()","f5",1);
Input:BindCommandToKey("#QuickLoad()","f8",1);
Input:BindCommandToKey("#BlindDeafEnemies()","f9",1);
Input:BindCommandToKey("#ToggleGod()","backspace",1);
Input:BindCommandToKey("#AllGrenades()","9",1);
Input:BindCommandToKey("#AllGear()","0",1);
Input:BindCommandToKey("#MoreAmmo()","o",1);
Input:BindCommandToKey("#AllWeapons()","p",1);


--- temp variables for functions below ---
prev_speed_walk=p_speed_walk;
prev_speed_run=p_speed_run;

prev_speed_walk2=p_speed_walk;
prev_speed_run2=p_speed_run;

default_speed_walk=p_speed_walk;
default_speed_run=p_speed_run;

screenshotmode=0;

fastfly=0;                                              -- for functions that toggle states
noclipfly=0;
blind_deaf_enemies=0;


function QuickSave()
        if _localplayer then
                Game:Save('Quicksave');
                Hud:AddMessage("[CHEAT]: Quick-saved the game.");
                System:LogToConsole("01CHEAT: Quick-saved the game.");
        else
                Hud:AddMessage("[CHEAT]: Cannot quick-save the game.");
        end
end
function QuickLoad()
        Game:Load('Quicksave');                                 -- also allowed when no game is yet loaded
        Hud:AddMessage("[CHEAT]: Quick-loaded the game.");
        System:LogToConsole("01CHEAT: Quick-loaded the game.");
end

function BlindDeafEnemies()
        if _localplayer then
                if (blind_deaf_enemies==1) then
                        ai_ignoreplayer=0;
                        ai_soundperception=1;
                        Hud:AddMessage("[CHEAT]: Enemies CAN see/hear you.");
                        System:LogToConsole("01CHEAT: Enemies CAN see/hear you.");
                else
                        ai_ignoreplayer=1;
                        ai_soundperception=0;
                        Hud:AddMessage("[CHEAT]: Enemies CANNOT see/hear you.");
                        System:LogToConsole("01CHEAT: Enemies CANNOT see/hear you.");
                end
                blind_deaf_enemies=1-blind_deaf_enemies;
        else
                Hud:AddMessage("[CHEAT]: No hiding from enemies.");
        end
end


function ToggleAIInfo()

        if (not aiinfo) then
                aiinfo=1;
        else
                aiinfo=1-aiinfo;
        end

        if (aiinfo==1) then
                ai_debugdraw=1;
                ai_drawplayernode=1;
                ai_area_info=1;
        else
                ai_debugdraw=0;
                ai_drawplayernode=0;
                ai_area_info=0;
        end
end

function GotoNextSpawnpoint()
        if _localplayer then
                local pt;
                pt=Server:GetNextRespawnPoint();

                if(not pt)then                                  -- last respawn point or there are no respawn points
                        pt=Server:GetFirstRespawnPoint();       -- try to get the first one
                end

                if(pt)then                                      -- if there is one
                        Game:ForceEntitiesToSleep();

                        _localplayer:SetPos(pt);
                        _localplayer:SetAngles({ x = pt.xA, y = pt.yA, z = pt.zA });
                end
                Hud:AddMessage("[CHEAT]: Jumped to next checkpoint.");
                System:LogToConsole("01CHEAT: Jumped to next checkpoint.");
        else
                Hud:AddMessage("[CHEAT]: Cannot jump to next checkpoint.");
        end
end

function SetPlayerPos()
        local p=_localplayer
        p:SetPos({x=100,y=100,z=300});
end


function ToggleFastFlyMode()
        if _localplayer then
                ToggleNewDesignerMode(40,120,1);
                if (fastfly==1) then
                        Hud:AddMessage("[CHEAT]: Fast Fly Mode OFF");
                        System:LogToConsole("01CHEAT: Fast Fly Mode OFF.");
                        fastfly=0;
                else
                        if (noclipfly==1) then
                                Hud:AddMessage("[CHEAT]: No-Clip Fly Mode OFF");
                                System:LogToConsole("01CHEAT: No-Clip Fly Mode OFF.");
                                noclipfly=0;
                        else
                                Hud:AddMessage("[CHEAT]: Fast Fly Mode ON");
                                System:LogToConsole("01CHEAT: Fast Fly Mode ON.");
                                fastfly=1;
                        end
                end
        else
                Hud:AddMessage("[CHEAT]: Cannot set fly mode.");
        end
end
function ToggleNoClipFlyMode()
        if _localplayer then
                ToggleNewDesignerMode(10,15,0);
                if (noclipfly==1) then
                        Hud:AddMessage("[CHEAT]: No-Clip Fly Mode OFF");
                        System:LogToConsole("01CHEAT: No-Clip Fly Mode OFF.");
                        noclipfly=0;
                else
                        if (fastfly==1) then
                                Hud:AddMessage("[CHEAT]: Fast Fly Mode OFF");
                                System:LogToConsole("01CHEAT: Fast Fly Mode OFF.");
                                fastfly=0;
                        else
                                Hud:AddMessage("[CHEAT]: No-Clip Fly Mode ON");
                                System:LogToConsole("01CHEAT: No-Clip Fly Mode ON.");
                                noclipfly=1;
                        end
                end
        else
                Hud:AddMessage("[CHEAT]: Cannot set fly mode.");
        end
end


-- replacement for ToggleSuperDesignerMode() and ToggleDesignerMode()
--
-- USAGE:
--  deactivate designer mode: (nil,nil,0)
--  old super designer mode (with collision): (40,120,1)
--  old designer mode (without collision): (10,15,0)
--  change values: call with (nil,nil,0) then with the new values (0.., 0.., 0/1)
--
function ToggleNewDesignerMode( speedwalk, speedrun, withcollide )

        if(SuperDesignerMode_Save1~=nil or speedwalk==nil) then
                --Hud:AddMessage("[CHEAT]: Fly mode OFF");

                p_speed_walk = SuperDesignerMode_Save1;
                p_speed_run = SuperDesignerMode_Save2;
                _localplayer.DynProp.gravity = SuperDesignerMode_Save3;
                _localplayer.DynProp.inertia = SuperDesignerMode_Save4;
                _localplayer.DynProp.swimming_gravity = SuperDesignerMode_Save5;
                _localplayer.DynProp.swimming_inertia = SuperDesignerMode_Save6;
                _localplayer.DynProp.air_control = SuperDesignerMode_Save7;
                _localplayer.cnt:SetDynamicsProperties( _localplayer.DynProp );
                SuperDesignerMode_Save1=nil;

                -- activate collision, parameter is 0 or 1
                _localplayer:ActivatePhysics(1);

        else
                --Hud:AddMessage("[CHEAT]: Fly mode ON");

                SuperDesignerMode_Save1 = p_speed_walk;
                SuperDesignerMode_Save2 = p_speed_run;
                SuperDesignerMode_Save3 = _localplayer.DynProp.gravity;
                SuperDesignerMode_Save4 = _localplayer.DynProp.inertia;
                SuperDesignerMode_Save5 = _localplayer.DynProp.swimming_gravity;
                SuperDesignerMode_Save6 = _localplayer.DynProp.swimming_inertia;
                SuperDesignerMode_Save7 = _localplayer.DynProp.air_control;

                p_speed_walk = speedwalk;
                p_speed_run = speedrun;
                _localplayer.DynProp.gravity=0.0;
                _localplayer.DynProp.inertia=0.0;
                _localplayer.DynProp.swimming_gravity=0.0;
                _localplayer.DynProp.swimming_inertia=0.0;
                _localplayer.DynProp.air_control=1.0;
                _localplayer.cnt:SetDynamicsProperties( _localplayer.DynProp );

                -- deactivate collision, parameter is 0 or 1
                _localplayer:ActivatePhysics(withcollide);
        end
end

function ToggleScreenshotMode()

        if(screenshotmode~=0) then
                System:LogToConsole("SCREENSHOTMODE OFF-->SWITCH TO NORMAL");
                screenshotmode=0;
                hud_crosshair = "1"
                cl_display_hud = "1"
                r_NoDrawNear = "0"
                ai_ignoreplayer = "0"
                ai_soundperception = "1"
                r_DisplayInfo = "1"
        else
                System:LogToConsole("SCREENSHOTMODE ON");
                screenshotmode=1;
                hud_crosshair = "0"
                cl_display_hud = "0"
                r_NoDrawNear = "1"
                ai_ignoreplayer = "1"
                ai_soundperception = "0"
                r_DisplayInfo = "0"
        end
end



function DecreaseSpeed()

        if tonumber(p_speed_walk)>5 then
                p_speed_walk=p_speed_walk-5;
                p_speed_run=p_speed_run-5;
                System:LogToConsole("Decreased player speed by 5");
        else
                System:LogToConsole("You can not go any slower!");
        end
end

function IncreaseSpeed()

        if tonumber(p_speed_walk)<500 then
                p_speed_walk=p_speed_walk+5;
                p_speed_run=p_speed_run+5;
                System:LogToConsole("Increased player speed by 5");
        else
                System:LogToConsole("You can not go any faster!");
        end
end

function DefaultSpeed()

        p_speed_walk=default_speed_walk;
        p_speed_run=default_speed_run;
        System:LogToConsole("Player speed reset");
end

function TeleportToSpawn(n)
        local player = _localplayer;
        local pos = Server:GetRespawnPoint("Respawn"..n);
        if pos then
                player:SetPos(pos);
                player:SetAngles({ x = pos.xA, y = pos.yA, z = pos.zA });
        end
end


-- Give the player the passed weapon, load it if neccesary
function AddWeapon(Name)

        Game:AddWeapon(Name)
        for i, CurWeapon in WeaponClassesEx do
                if (i == Name) then
                        _localplayer.cnt:MakeWeaponAvailable(CurWeapon.id);
                end
        end    
end


--_localplayer.cnt.ammo=999;            -- Reserve ammo         -- Relevant to ammo manipulations
--_localplayer.cnt.ammo_in_clip=999;    -- Clip ammo


function MoreAmmo()

        if _localplayer then
                local weapon = _localplayer.cnt.weapon;
                local name = "";
                local nAmmo = 0;
                local nFireMode = 0;
                if (weapon) then
                        name = weapon.name;
                        nFireMode = _localplayer.cnt.firemode;          -- .firemode exists even for single firemode cases.
                        if (name=="AG36") then
                                if (nFireMode == 0) then
                                        nAmmo = 300;
                                else
                                        nAmmo = 10;
                                        nFireMode = 2;                  -- Flag an alt-ammo add, for displayed message.
                                end
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="Falcon") then
                                nAmmo = 150;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="SniperRifle") then
                                nAmmo = 30;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="MP5") then
                                nAmmo = 300;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="RL") then
                                nAmmo = 10;
                                _localplayer.cnt.ammo = nAmmo;
                                name = "Rocket Launcher";
                        end
                        if (name=="Shotgun") then
                                nAmmo = 50;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="OICW") then
                                if (nFireMode == 0) then
                                        nAmmo = 300;
                                else
                                        nAmmo = 10;
                                        nFireMode = 2;                  -- Flag an alt-ammo add, for displayed message.
                                end
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="P90") then
                                nAmmo = 300;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="M4") then
                                nAmmo = 300;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        if (name=="M249") then
                                nAmmo = 300;
                                _localplayer.cnt.ammo = nAmmo;
                        end
                        local sFireMode = "";
                        if (nFireMode==2) then sFireMode="(alt fire-mode) "; end;
                        Hud:AddMessage("[CHEAT]: Set the ammo reserve for weapon '" ..name.."' "..sFireMode.."to

"..nAmmo..".");
                        System:LogToConsole("01CHEAT: Set the ammo reserve for weapon '" ..name.."' "..sFireMode.."to

"..nAmmo..".");
                else
                        Hud:AddMessage("[CHEAT]: No ammo added.  Try arming a gun first.");
                end
        else
                Hud:AddMessage("[CHEAT]: Cannot give ammo.");
        end
end


-- These script commands can set the ammo reserve of the player for some types of ammo.
--      (The ammo is not loaded, just in reserve.)
--              _localplayer.Ammo.Pistol = 150;
--              _localplayer.Ammo.Assault = 300;
--              _localplayer.Ammo.Sniper = 30;
--              _localplayer.Ammo.SMG = 350;
--              _localplayer.Ammo.Shotgun = 50;
--              --_localplayer.Ammo.MortarShells = 10;  -- This one doesn't seem to work.
--              _localplayer.Ammo.SmokeGrenade = 6;
--              _localplayer.Ammo.FlashbangGrenade = 6;
--              --_localplayer.Ammo.HandGrenade = 6;    -- This one doesn't seem to work.
--              _localplayer.Ammo.Rocket = 10;


function AllWeapons()
        if _localplayer then
                AddWeapon("AG36");
                AddWeapon("Falcon");
                AddWeapon("SniperRifle");
                AddWeapon("MP5");
                AddWeapon("RL");
                AddWeapon("Shotgun");
                AddWeapon("OICW");
                AddWeapon("P90");
                --AddWeapon("M4");      -- Maximum of 9 weapons can be carried (all accessed by mouse-wheel)
                AddWeapon("M249");
                Hud:AddMessage("[CHEAT]: Give 9 weapons.  (Drop unwanted weapons. Access all weapons by mouse-wheel.)");
                System:LogToConsole("01CHEAT: Give 9 weapons.  (Drop unwanted weapons. Access all weapons by mouse-

wheel.)");
        else
                Hud:AddMessage("[CHEAT]: Cannot give weapons.");
        end
end

function AllGrenades()
        if _localplayer then
                local nHG = _localplayer:GetAmmoAmount("HandGrenade");
                local nSG = _localplayer:GetAmmoAmount("SmokeGrenade");
                local nFG = _localplayer:GetAmmoAmount("FlashbangGrenade");
                _localplayer:AddAmmo("FlashbangGrenade",6-nFG);
                _localplayer:AddAmmo("SmokeGrenade",6-nSG);
                _localplayer:AddAmmo("HandGrenade",6-nHG);
                --_localplayer.Ammo.SmokeGrenade = 6;                   -- Set exact amount, no worries to exceed normal

maximum.
                --_localplayer.Ammo.FlashbangGrenade = 6;
                --_localplayer.Ammo.HandGrenade = 6;                    -- Doesn't work unfortunately
                --_localplayer.cnt.grenadetype = 2;                     -- HUD selects hand grenade.
                --_localplayer.cnt.numofgrenades = 6;                   -- Set selected grenade's amount.
                                                                        -- Set .grenadetype is annoyingly asynchronous, but

one use is fine.
                Hud:AddMessage("[CHEAT]: Give all grenades.");
                System:LogToConsole("01CHEAT: Give all grenades.");
        else
                Hud:AddMessage("[CHEAT]: Cannot give grenades.");
        end
end

function AllGear()
        if _localplayer then
                _localplayer.cnt:GiveBinoculars(1);
                _localplayer.cnt:GiveFlashLight(1);
                _localplayer.items.heatvisiongoggles=1;
                Hud:AddMessage("[CHEAT]: Give binoculars, flashlight, and heat-vision goggles.");
                System:LogToConsole("01CHEAT: Give binoculars, flashlight, and heat-vision goggles.")
        else
                Hud:AddMessage("[CHEAT]: Cannot give gear.");
        end
end

function ToggleGod()
        if _localplayer then
                if (not god) then
                        god=1;
                else
                        god=1-god;
                end
                -- Check if we are going to set or remove god mode now.
                if (god==1) then
                        GodMode_Save1 = _localplayer.cnt.health;
                        GodMode_Save2 = _localplayer.cnt.armor;
                        _localplayer.cnt.health = 99999;
                        _localplayer.cnt.armor = 99999;
                        Hud:AddMessage("[CHEAT]: God Mode ON. Set health and armor to 99999.");
                        System.LogToConsole("01CHEAT: God Mode ON. Set health and armor to 99999.");
                else
                        _localplayer.cnt.health = GodMode_Save1;
                        _localplayer.cnt.armor = GodMode_Save2;
                        Hud:AddMessage("[CHEAT]: God Mode OFF. Restored health ("..GodMode_Save1..") and armor

("..GodMode_Save2..").");
                        System:LogToConsole("01CHEAT: God Mode OFF. Restored health ("..GodMode_Save1..") and armor

("..GodMode_Save2..").");
                end
        else
                Hud:AddMessage("[CHEAT]: Cannot set god mode.");
        end
end

--Hud:AddMessage("Loaded script: DevMode.lua"); -- debugging feedback


_______________________________________________________________________________

END DevMode.LUA Contents 
_______________________________________________________________________________

Download DevMode.lua file as ZIP or copy/paste contents above. 
                    

Games You May Like...