sagefhopkins
Pre Member-
Content Count
2 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout sagefhopkins
-
Rank
Newbie
Profile Information
-
Gender
Not Telling
Recent Profile Visitors
472 profile views
-
sagefhopkins started following ARMA 3 - MISSION EDITING & SCRIPTING
-
extDB (arma3 extension linux/windows)
sagefhopkins replied to torndeco's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I'm still unable to get anything to actually log into my database. I am not sure I understand what joinString does, some explanation would be very helpful :P Here is the scripts after the modifications suggested by you, please tell me if there is anything wrong with it. _unit = player; removeAllItems _unit; removeAllAssignedItems _unit; removeUniform _unit; removeVest _unit; player addweapon "SMG_01_F"; player addPrimaryWeaponItem "muzzle_snds_acp"; player addPrimaryWeaponItem "optic_Holosight"; player addPrimaryWeaponItem "acc_flashlight"; player addMagazine "30Rnd_45ACP_Mag_SMG_01"; player addBackpack "B_AssaultPack_blk"; player forceAddUniform "U_IG_Guerilla2_3"; player addWeapon "hgun_ACPC2_F"; player addMagazine "9Rnd_45ACP_Mag"; player addSecondaryWeaponItem "muzzle_snds_acp"; player addItem "H_Cap_usblack"; player addVest "V_TacVest_blk_POLICE"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "30Rnd_45ACP_Mag_SMG_01"; player addItemToVest "9Rnd_45_ACP_Mag"; player addItemToVest "9Rnd_45_ACP_Mag"; player addItemToVest "9Rnd_45_ACP_Mag"; player addItemToVest "9Rnd_45_ACP_Mag"; player addItemToBackpack "FirstAidKit"; player addItemToBackpack "FirstAidKit"; player addItemToBackpack "FirstAidKit"; _query = [_uid, _name, _beguid] joinString ":"; "extDB2" callExtension _query; [Main] Version = 5 ;Threads = 0 ; Default Value is the number of CPU Cores Detected (max value is 6, min value is 2) Randomize Config File = false ;This is a legacy option to randomize config file for Arma2 Servers. Only for Windows Builds [Rcon] ;; This is functional, should be working fine. Just needs abit of testing on a $ ;; Allow for changing Address for those running server in a VM environment. IP = 127.0.0.1 Port = 2302 ;; Rcon Password i.e Battleye/beserver.cfg Password = password ;; Bad Player Name Checks ;; This will only work if your mission / mod has started extDB2 Rcon. i.e 9:START_RCON:RCON Bad Playername Enable = false Bad Playername Kick Message = Bad Player Name ;; By default : is a bad character (used as seperator for extDB2 Calls (this is hardcoded in) ;;Bad Playername Strings = (:):{:} ;;Bad Playername Regex_1 = [:alnum:] ;;Bad Playername Regex_2 = [:alnum:] ;;Bad Playername Regex_3 = [:alnum:] ;; Whitelisting / Reserve Slots ;; This will only work if your mission / mod has started extDB2 Rcon. i.e 9:START_RCON:RCON Whitelist Enable = false Whitelist Kick Message = Only Reserved Slots Left Whitelist Public Slots = 999 ;; Database settings to use (Optional) Whitelist Database = MySQL_Example Whitelist SQL Prepared Statement = SELECT CASE WHEN EXISTS(SELECT UID FROM PlayerInfo WHERE BattlEyeGUID=? AND Whitelisted=1) THEN 1 ELSE 0 END Whitelist Kick on SQL Query Failed = false ;; Hardcoded BEGuids for whitelisted players ;Whitelist BEGuids = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx : yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy [RemoteAccess] ;; Remote TCP Access to extDB2 Enable = true Port = 2300 MaxThreads = 4 MaxQueued = 4 IdleTime = 120 Password = password [Steam] ;; This is for VAC Protocol for VAC Bans + Steam Friends. ;; https://steamcommunity.com/dev/apikey API Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [VAC] ;; This feature requires Steam + Rcon to be enabled. ;; Also this feature is called via SQF Code atm, i.e it doesn't auto detect players joining server yet.... Auto Ban = true ;; For Player to get banned ( their total VAC Bans => NumberOfVACBans) AND ( Days Since their Last Ban was <= DaysSinceLastBan) ;; This is also used extDB Protocol VAC:VACBanned returned results NumberOfVACBans = 1 DaysSinceLastBan = 999999999 BanDuration = 0 ;; 0 = Forever, otherwise its x Minutes BanMessage = Steam VAC Banned [Log] ;; Flush Logs after each write, more work on Harddrive Flush = true [Test] Type = MySQL Name = Test Username = root Password = ********** IP = ************* Port = 3306 ;minSessions = 2 idleTime = 60 compress = false ; Really should only use this if MySQL server is external. Also only for MySQL Secure Auth = true ; Recommend you turn this on http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_secure-auth ;Database Calls [Save] SQL1_1 = INSERT INTO Test (UID, Name, BattlEyeGUID) SQL1_2 = VALUES (?, ?, ?); SQL1_INPUTS = 1, 2, 3-BeGUID Number of Inputs = 3 -
extDB (arma3 extension linux/windows)
sagefhopkins replied to torndeco's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hello, I am trying to connect a mission to my MySQL database, so I can save some player stats, however I am very confused about how to make a call to the database to insert the players data. Currently the snippet is just a test to see if the database is recieving the data. Please correct any issues, you just help me write a line or two to be able to correctly connect. "extDB2" callExtension "1:Test:Save"; [Main] Version = 5 ;Threads = 0 ; Default Value is the number of CPU Cores Detected (max value is 6, min value is 2) Randomize Config File = false ;This is a legacy option to randomize config file for Arma2 Servers. Only for Windows Builds [Rcon] ;; This is functional, should be working fine. Just needs abit of testing on a $ ;; Allow for changing Address for those running server in a VM environment. IP = 127.0.0.1 Port = 2302 ;; Rcon Password i.e Battleye/beserver.cfg Password = password ;; Bad Player Name Checks ;; This will only work if your mission / mod has started extDB2 Rcon. i.e 9:START_RCON:RCON Bad Playername Enable = false Bad Playername Kick Message = Bad Player Name ;; By default : is a bad character (used as seperator for extDB2 Calls (this is hardcoded in) ;;Bad Playername Strings = (:):{:} ;;Bad Playername Regex_1 = [:alnum:] ;;Bad Playername Regex_2 = [:alnum:] ;;Bad Playername Regex_3 = [:alnum:] ;; Whitelisting / Reserve Slots ;; This will only work if your mission / mod has started extDB2 Rcon. i.e 9:START_RCON:RCON Whitelist Enable = false Whitelist Kick Message = Only Reserved Slots Left Whitelist Public Slots = 999 ;; Database settings to use (Optional) Whitelist Database = MySQL_Example Whitelist SQL Prepared Statement = SELECT CASE WHEN EXISTS(SELECT UID FROM PlayerInfo WHERE BattlEyeGUID=? AND Whitelisted=1) THEN 1 ELSE 0 END Whitelist Kick on SQL Query Failed = false ;; Hardcoded BEGuids for whitelisted players ;Whitelist BEGuids = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx : yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy [RemoteAccess] ;; Remote TCP Access to extDB2 Enable = true Port = 2300 MaxThreads = 4 MaxQueued = 4 IdleTime = 120 Password = password [Steam] ;; This is for VAC Protocol for VAC Bans + Steam Friends. ;; https://steamcommunity.com/dev/apikey API Key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [VAC] ;; This feature requires Steam + Rcon to be enabled. ;; Also this feature is called via SQF Code atm, i.e it doesn't auto detect players joining server yet.... Auto Ban = true ;; For Player to get banned ( their total VAC Bans => NumberOfVACBans) AND ( Days Since their Last Ban was <= DaysSinceLastBan) ;; This is also used extDB Protocol VAC:VACBanned returned results NumberOfVACBans = 1 DaysSinceLastBan = 999999999 BanDuration = 0 ;; 0 = Forever, otherwise its x Minutes BanMessage = Steam VAC Banned [Log] ;; Flush Logs after each write, more work on Harddrive Flush = true [Test] Type = MySQL Name = Test Username = root Password = ******** IP = **.**.**.*** Port = 3306 ;minSessions = 2 idleTime = 60 compress = false ; Really should only use this if MySQL server is external. Also only for MySQL Secure Auth = true ; Recommend you turn this on http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_secure-auth [MySQL_Example] Type = MySQL Name = Database_Name Username = root Password = password IP = 127.0.0.1 Port = 3306 ;minSessions = 2 idleTime = 60 compress = false ; Really should only use this if MySQL server is external. Also only for MySQL Secure Auth = true ; Recommend you turn this on http://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_secure-auth [SQLite_Example] Type = SQLite Name = sqlite.db minSessions = 1 ; minSession Default Value = 1 ;maxSessions = 4 ; maxSession Default Value = number of Main->Threads ; You really should leave this value alone idleTime = 60 ; idleTime no Default Value yet, needs to be defined. ; idleTime is the time before a database session is stopped if not used. ; If Database Sessions are greater than minSessions [HTTP_Example] Type = HTTP Host = 127.0.0.1 Port = 80 ; Username = user ; Password = password ;Database Calls [Save] SQL1_1 = INSERT INTO PlayerInfo (UID, Name, BattlEyeGUID) SQL1_2 = VALUES ('HELLO', 2, 3); Number of Inputs = 3