Arma 3 codes and cheats to use when testing a mission.


  1. Misc cheats and useful codes
  2. A nice script to fire artillery shells or bombs from your rifle
  3. A very nice After Action Replay system for Arma 3

Misc cheats and useful codes

Type this in the debug box if you want to be invincible when testing a mission.

player allowdamage false;

If you wish to have no fatigue from running, this will work.

player setCustomAimCoef 0.34;
player setUnitRecoilCoefficient 0.50;
player enablestamina false;

To have unlimited ammo on your person or on a vehicle, use this in the init.

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}];

Increase the carrying capacity of your character and also make you a bit harder to see.

player setUnitTrait ["camouflageCoef",0.4];
player setUnitTrait ['loadCoef',-300];

Put this in the description.ext file to set up revive and the garbage collector to delete dead bodies and clean up the battlefield.

description.ext
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
corpseManagerMode = 1; // Default: 0 for SP, 2 for MP
corpseLimit = 4; // Default: 15
corpseRemovalMinTime = 20; // seconds. Default: 10
corpseRemovalMaxTime = 40; // seconds. Default: 3600
 
wreckManagerMode = 1; // Default: 0 for SP, 2 for MP
wreckLimit = 4; // seconds. Default: 15
wreckRemovalMinTime = 20; // seconds. Default: 10
wreckRemovalMaxTime = 40; // seconds. Default: 36000 (10 hours)
minPlayerDistance = 40; // meters. Default: 0
 
respawnonstart = 0;
respawnDelay = 0;
 
reviveMode = 1;
reviveUnconsciousStateMode = 0;
reviveRequiredTrait = 1;
reviveRequiredItems = 1;
reviveRequiredItemsFakConsumed = 1;
reviveDelay = 10;
reviveBleedOutDelay = 300;
allowProfileGlasses = 1;
briefing = 0;

Put this code in the initServer.sqf file to have custom raindrops in a mission.

initServer.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
0 setOvercast 1;
0 setRain 1;
0 setFog 0.1; // snow affects visibility at distance
setHumidity 0.9; // don't want to see dust clouds
enableEnvironment [false, true]; // don't want to see snakes and butterflies either
 
forceWeatherChange;
[
	"a3\data_f\rainnormal_ca.paa",	// rainDropTexture
	1,	// texDropCount
	0.01,	// minRainDensity
	15,	// effectRadius
	0.3,	// windCoef
	0.5,	// dropSpeed
	0.7,	// rndSpeed
	0.5,	// rndDir
	0.01,	// dropWidth
	0.01,	// dropHeight
	[0.2, 0.1, 0.1, 1],	// dropColor
	0.1,	// lumSunFront
	0.1,	// lumSunBack
	5.5,	// refractCoef
	0.3,	// refractSaturation
	true,	// snow
	false	// dropColorStrong
]
call BIS_fnc_setRain;

This is a new feature added in an update.

A nice script to fire artillery shells or bombs from your rifle

This script will fire a 155mm HE shell from your rifle. This is a very nice script.

player addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    if (!local _unit) exitWith {};
 
    private _position = getPosWorld _projectile;
    private _dirAndUp = [vectorDir _projectile, vectorUp _projectile];
    private _velocity = velocity _projectile;
 
    deleteVehicle _projectile;
 
    _projectile = "Sh_155mm_AMOS" createVehicle [0,0,0];
    _projectile setPosWorld _position;
    _projectile setVectorDirAndUp _dirAndUp;
    _projectile setVelocityModelSpace [0, 1250, 0];
 
    [_projectile, [_unit, _gunner]] remoteExec ["setShotParents", 2];
}];

Try this version, this will fire a GBU from your rifle.

player addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    if (!local _unit) exitWith {};
 
    private _position = getPosWorld _projectile;
    private _dirAndUp = [vectorDir _projectile, vectorUp _projectile];
    private _velocity = velocity _projectile;
 
    deleteVehicle _projectile;
 
    _projectile = "Bomb_04_F" createVehicle [0,0,0];
    _projectile setPosWorld _position;
    _projectile setVectorDirAndUp _dirAndUp;
    _projectile setVelocityModelSpace [0, 1250, 0];
 
    [_projectile, [_unit, _gunner]] remoteExec ["setShotParents", 2];
}];

Set the terrain height of a certain area using this script, set the radius and the position and you may create a depression in the ground.

private _Radius = 350;
private _myPos = [14642.2,16752.9,0];
private _desiredTerrainHeight = 8;
private _positionsAndHeights = [_myPos, _Radius, _Radius, _desiredTerrainHeight] call _fnc_flattenTerrain;
setTerrainHeight [_positionsAndHeights, true];

A very nice After Action Replay system for Arma 3

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.