Get ready for the release of Arma Reforger / Arma 4 with these resources.

Arma Reforger / Arma 4 is due to release sometime tomorrow I hope. There are quite a few resources around concerning the DayZ Enscript scripting language that is used by the Enfusiontm Engine. Here is the scripting guide for Dayz. https://community.bistudio.com/wiki/DayZ:Enforce_Script_Syntax. The syntax is rather like C# or C++, but…

Read More

Miscellaneous programming tricks with C.

This is a very simple Hello World program in C. int main() { write(1, "Hello World\n", 14); }int main() { write(1, "Hello World\n", 14); } Counting how long a text string is. #include <stdio.h> #include <string.h> #define MSG "Hello Doctor, let’s get back to the TARDIS!" int main() { int…

Read More

Very useful Arma 3 scripting samples for making a nice mission easily.

To set the arsenal action on all crates in your base, use this code. This will give the Arsenal action to the Cargo Net Box item. Put this in the initPlayerLocal.sqf file. { [_x, "Open the Arsenal", "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa", "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa", "(_this distance _target < 6) && (isNull (findDisplay 162))", "isNull (findDisplay…

Read More

Start a mortar strike on an enemy position in Arma 3.

This simple code will start a mortar strike on an enemy position when a vehicle is destroyed. car1 addEventHandler [ ‘Killed’, { _bombardment = [BIS_Mortar,getMarkerPos "mk2","8Rnd_82mm_Mo_shells",100,24,10] execVM "a3\missions_f_exp\showcases\showcase_endgame.tanoa\scripts\firesupport.sqf"; }];car1 addEventHandler [ ‘Killed’, { _bombardment = [BIS_Mortar,getMarkerPos "mk2","8Rnd_82mm_Mo_shells",100,24,10] execVM "a3\missions_f_exp\showcases\showcase_endgame.tanoa\scripts\firesupport.sqf"; }]; Name the mortar BIS_Mortar, then place a marker on the…

Read More

Arma 3 scripting tricks and samples for making missions.

Detect if a player has the APEX DLC. if (395180 in getDLCs 1) then { (_this select 0) ctrlsettext ‘\a3\Ui_f\Data\Logos\arma3apex_white_ca.paa’; };if (395180 in getDLCs 1) then { (_this select 0) ctrlsettext ‘\a3\Ui_f\Data\Logos\arma3apex_white_ca.paa’; }; Remove all NVG goggles and weapons from enemies. { if (side _x == east) then { _x…

Read More

Very useful Arma 3 code for mods and missions.

A code sample that creates a weapon box with some ammo. Just change the class names to add a weapon of your choice to this box. class cfgVehicles { class Thing; class ThingX; class ReammoBox; class Strategic; class EAST_Box_Base; class NATO_Box_Base; class Railgun_Transport_Box: EAST_Box_Base { scope = 2; vehicleClass =…

Read More

Very interesting and useful Arma 3 scripting commands for multiplayer missions.

Arma 3 scripting samples for creating MP missions This code sample inserted into the initServer.sqf will protect buildings 900m around your base from destruction by retards with a grudge against your server. { _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]);{ _x allowdamage false; } foreach (nearestTerrainObjects [crat99,["house"],900]); Name an object…

Read More

Very useful C code samples. These might be very useful to someone.

Some very useful code samples for any C programmer. These might give you some new ideas. Print the time and date with C. #include <time.h> // For time function (random seed). #include <stdio.h> // For extra functions. printf(). #include <stdlib.h> // For getenv();   #define format "The time and date…

Read More

Even more very useful Arma 3 script samples.

Some very good Arma 3 scripting samples Put this code into the init of a crate to create an Arsenal crate. this addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }];this addaction ["Open Virtual Arsenal", { ["Open",true] call BIS_fnc_arsenal; }]; This code in the initPlayerLocal.sqf and onPlayerRespawn.sqf files will remove…

Read More

Some very interesting programming code snippets.

This perl script is an old piece of code that will create a Windows version text string. I am sure someone might find this useful. #!/usr/bin/perl   use warnings;   @t = localtime(time());   $yr = ($t[5] + 1900) -1; $sr = int(( $t [4]/4) + 1); $v = int("$t[7]$t[2]$t[1]$t[0]"*((rand(rand(10)…

Read More

Iptables samples. Very good ways to filter network traffic.

Sample Iptables configurations A sample iptables output that I am using on an OpenVPN server to allow Internet traffic to be passed through it. ubuntu ~ $ sudo iptables-save # Generated by iptables-save v1.4.21 on Wed Aug 2 22:19:48 2017 *filter :INPUT ACCEPT [2654934:1228315333] :FORWARD ACCEPT [31023:17433690] :OUTPUT ACCEPT [2475842:555885003]…

Read More

Useful C tricks and code samples.

How to define a string and print it out with the printf() function. #include <stdio.h>   /* Defining a global string. */   #define hi "Hello Sire."   int main(void) { /* Printing out the string. */ printf("%s\n", hi);   return 0; }#include <stdio.h> /* Defining a global string. */…

Read More

Some useful bash shell scripts for the Linux user.

This function will allow your computer to speak. function shellspeak() { mplayer "http://translate.google.com/translate_tts?tl=en&q=$(echo $@ | sed ‘s/\s/+/’)" > /dev/null 2>&1; }function shellspeak() { mplayer "http://translate.google.com/translate_tts?tl=en&q=$(echo $@ | sed ‘s/\s/+/’)" > /dev/null 2>&1; } A script that will change all files in a directory to lowercase filenames. function lowercase() # move…

Read More