← Go back

ArmaDB official release - MySql and MariaDB plugin for Arma 3 Servers


Posted on April 20, 2018 at 13:06 (GMT +00:00) by Colin



I finally got around to correcting some of the 64-bit code and some basic testing for my ArmaDB plugin for Arma 3 (see previous beta release here)

ArmaDB is a plugin and interface to use mysql/mariadb from Arma 3 dedicated server on Windows, it is developed to allow easy integration, high performance and easy usage, you can use it for storing persistent data in your database, whether it is scores, money, inventories, containers or anything your imagination comes up with!

This version is bug tested, tuned and contains both libraries for 32-bit and 64-bit windows dedicated server, I am now ready to take suggestions/ideas from anyone wanting to use the library.

Download Plugin and Sample Mod here

Sample addon (posted from previous post, added here for ease of access)
//
// PXSample mod
// 

#include "PX\mysql.sqf";

// init db ?
[] call mysql_init;
mydb = ['root', 'yourpassword', 'databasename', 'localhost', 3306] call mysql_connect;

addMissionEventHandler ["EntityRespawned", {
	params ["_obj", "_old"];
	private ["_result", "_resource", "_row", "_uid"];
	
	if (isPlayer _obj) then {	
		_uid = getPlayerUID _obj;
			
		_result = [mydb, "SELECT acc_uid FROM accounts WHERE acc_uid = '%1' LIMIT 1;", _uid] call mysql_query;
		if (_result == "") then {
			_resource = [mydb] call mysql_store_result;
					
			if (!(_resource == "")) then {
				_row = [_resource] call mysql_fetch_row;
						
				if (count _row > 0) then {
					// player exists already? do something maybe
				} else {	
					[mydb, "INSERT INTO accounts(acc_uid, acc_clientname, acc_last_conn_dt) VALUES('%1','%2',NOW());", _uid, name _obj] call mysql_query;
				};
			};
					
			[_resource] call mysql_free_result;			
		};
	};
}];


Don't forget to drop me a comment and any suggestions below.
/Scripting/Programming/Game Modding

Search
Tags
Accident Adoption Albums Algorithms Altcoins Animal Rescue AnL Aquarium Arma ArmA nd Leg Array Partitioning Arrays Assembler Assembly Atanasovsko Award Bazaar Binary Search Bitcoin Bohemia Bootstrap Bulgaria Bulgaria Za Mladite Burgas C C++ Celerity Charity Chemical Records Chemical Shock Chemlight Code Competition Compiler Contest Converter Covid-19 CPP Crypto Cryptocurrency css Data Recovery Database DataTables Decode Dedicated Dedicated Server Delphi Development Dialogs Divide & Conquer DIY DnB Drum & Bass Earplugs Event Exchange Eyes Fish Floating-point Flood Fog Freeware Function Funny Gallery Game Game Development Game Modding Gaming Garden Gardening Gazebo GERB GitHub Glitch Hamish Harding Happy New Year Heapify HeapSort Helga HTML HTML entities Introduction Jackie JavaScript JQuery Jungle Lake Language Linker Listbox ListNBox lnbSetTooltip MariaDB Maths Merry Christmas Mini Mining Miningpoolhub Mist Modding MPH Multiplayer Music MySql NGO OceanGate One Nature ORCA organisation OverHertz Paludarium Pandemic Pascal Paul-Henri Nargeolet Paws Furever Pergola Persistence Pets Photography Pier Plugin Programming progress bar Project PX Library Quicksort r53 Racing Replace Scripting Searching Server Shahzada Dawood Simulation Simulator Smoke Snippet Social media Software Sorting Source Sourcecode SQF Statistics Stockton Rush String Strings Submarine Suleman Dawood Terrain Detail Text Titan Tool Tragedy tutorial UCS4Char UE4 Unreal Engine Victims View Distance ViewBug web Web Development Website Welcome Woodworking Ziron Zynk