Arma2SQL Life 1.0

 

 

Table of content

  1. Installation
  2. Commands
  3. Known issues
  4. Credits

 

1.INSTALLATION

  1. Please create a backup of your mission before attempting to install!
  2. Place SQL-Scripts folder in your mission root folder.
  3. Add this code to your INIT.SQF file in a isserver if statement.
    [] call compile preprocessFileLineNumbers "SQL-Scripts\server\savefunc.sqf";
    [] call compile preprocessFileLineNumbers "SQL-Scripts\server\serverevents.sqf";
  4. Add this code to your INIT.SQF in a isclient or !dedicatedserver if statement.
    [] call compile preprocessFileLineNumbers "SQL-Scripts\client\savefunc.sqf";
    [] call compile preprocessFileLineNumbers "SQL-Scripts\client\clientinit.sqf";
  5. Open Description.ext and add this line.
    #include "SQL-Scripts\dialogs\dialogs.hpp"
  6. Run the life_DB.sql query in your mysql server, please note this documentation does not cover installation of Arma2NET or Arma2MySQL.
  7. Done! Any issues contact Infection/Linnet on the BI forums, preferably in the Arma2SQL Life Thread.

 

2.COMMANDS

The default arguments follow from left to right in order.

[Player] call DB_LOAD

DB_LOAD calls the server to send a query to recieve your stats and send it back to you.

Default argument: Player

[Player, Int, Array, Array, Double] call DB_NEW

DB_NEW inserts a new save in your database.

Default arguments: Player, Bank, Inventory, License, Streetrep

[Player, Int, Array, Array, Double] call DB_SAVE

DB_SAVE updates all your variables and stats.

Default arguments: Player, Bank, Inventory, License, Streetrep

Additonal Commands

[string, string] call C_HINT

It hints in color.

Default argument: Text, Hex color code

[Array] call TO_ASCII

TO_ASCII turns your two-dimensional arrays into a single array of ASCII.

Default arguments: Inventory

[String] call TO_ARRAY

TO_ARRAY turns your single ASCII-filled array back into a two-dimensional array.

Default arguments: ASCII-array

 

3.Known Issues

 

Credits

Thanks to firefly2442 for creating Arma2MySQL.

Thanks to ScottNZ for creating Arma2NET.

This was created by Infection/Linnet, anyone may use and modify it but I ask that you keep the credits and do not try to claim it as your own.