diff --git a/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf b/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf index 1397d17..b529c75 100644 --- a/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf +++ b/@ExileServer/addons/exad_vg/Functions/fn_VGStore.sqf @@ -34,6 +34,7 @@ if!(isNil "ExAd_VG_CLEAN_ON_STORE")then{ clearItemCargoGlobal _objVeh; clearMagazineCargoGlobal _objVeh; clearWeaponCargoGlobal _objVeh; + _objVeh setVariable ["ExileMoney", 0, true]; } }; diff --git a/@ExileServer/extDB/sql_custom_v2/exile.ini b/@ExileServer/extDB/sql_custom_v2/exile.ini index ca73efe..2321c81 100644 --- a/@ExileServer/extDB/sql_custom_v2/exile.ini +++ b/@ExileServer/extDB/sql_custom_v2/exile.ini @@ -7,6 +7,13 @@ Number Of Inputs = 2 SQL1_INPUTS = 1,2 OUTPUT = 1 +; Removes vehicles that were not used within ? days +[deleteOldVehicles] +;SQL1_1 = DELETE FROM vehicle WHERE deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) +SQL1_1 = DELETE FROM vehicle WHERE territory_id IS NULL AND deleted_at < DATE_SUB(NOW(), INTERVAL ? DAY) +Number Of Inputs = 1 +SQL1_INPUTS = 1 + ;2. Add all below in the end of the file. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Virtual Garage related queries | ADDED BY [ExAd]Jan diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.txt b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.txt new file mode 100644 index 0000000..ce7a0a3 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/message.txt @@ -0,0 +1,11 @@ +GENERAL RULES
+______________________________________________________________________________
+ +
SIDE-CHAT
+______________________________________________________________________________
+ +GREEN TRADE-ZONE RULES
+______________________________________________________________________________
+ +BUILDING RULES
+______________________________________________________________________________
diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf new file mode 100644 index 0000000..05d19a1 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onClose.sqf @@ -0,0 +1,3 @@ +if (ExileClientXM8CurrentSlide == "ExAd_Info") then { + ExileClientXM8CurrentSlide = "apps"; +}; \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf new file mode 100644 index 0000000..512a85d --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onLoad.sqf @@ -0,0 +1,35 @@ +/* + fn_createExtraApps.sqf + + Copyright 2016 Jan Babor + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +params["_display","_slide","_idc"]; + +_pW = 0.025; +_pH = 0.04; +_leftCol = 0; +_leftColW = 12.8; +_rightCol = _leftCol + _leftColW + 2; +_rightColW = _leftColW + 3; +_margin = 0.2; + +_slideClass = "ExAd_Info"; + +[_display,_slide,([_slideClass,"backButton"] call ExAd_fnc_getNextIDC),[27 * _pW, 17 * _pH, 6 * _pW, 1 * _pH],'["extraApps", 1] call ExileClient_gui_xm8_slide;',STR_ExAd_VG_APP_BTN_BACK] call ExAd_fnc_createButton; + +_newParent = [_display,_slide,([_slideClass,"ctrlGrp"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1 * _pH, (_leftColW + _rightCol + 6) * _pW, 16 * _pH],0.5,5,true] call ExAd_fnc_createCtrlGrp; +[_display,_newParent,([_slideClass,"strTxt"] call ExAd_fnc_getNextIDC),[_leftCol * _pW, 1.5 * _pH, (_leftColW + _rightCol + 5) * _pW, 15 * _pH],"","PuristaMedium",1,"#ffffff","right",1] call ExAd_fnc_createStructuredText; + +true \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf new file mode 100644 index 0000000..b8e4aa9 --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Apps/Info/onOpen.sqf @@ -0,0 +1,28 @@ +private["_display","_message","_strTxt"]; + +try +{ + _message = loadFile "ExAdClient\XM8\Apps\Info\message.txt"; + + if(count _message == 0)exitWith{ + throw "No server info provided"; + }; + + _display = uiNameSpace getVariable ["RscExileXM8", displayNull]; + if(isNull _display)exitWith{ + throw "No server info provided!"; + }; + + _strTxt = [_display,"ExAd_Info","strTxt"] call ExAd_fnc_getAppCtrl; + _strTxt ctrlSetStructuredText parseText format[_message]; + + _pos = ctrlPosition _strTxt; + _strTxt ctrlSetPosition [_pos select 0, _pos select 1, _pos select 2, ctrlTextHeight _strTxt]; + _strTxt ctrlcommit 0; + ctrlSetFocus ([_display,"ExAd_Info","ctrlGrp"] call ExAd_fnc_getAppCtrl); +} +catch +{ + ["ErrorTitleAndText", ["ExAd - Server Info", _exception]] call ExileClient_gui_toaster_addTemplateToast; + ["extraApps", 1] call ExileClient_gui_xm8_slide +} \ No newline at end of file diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp index be363d6..72a4a95 100644 --- a/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/CfgFunctions.cpp @@ -23,6 +23,7 @@ file = "ExAdClient\XM8\Functions"; class createBackgroundGUI {}; class createButton {}; class createCheckBox {}; + class createCtrlGrp {}; class createExtraApps {}; class createFrame {}; class createList {}; diff --git a/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf new file mode 100644 index 0000000..4afa25e --- /dev/null +++ b/mpmissions/Exile.Altis/ExAdClient/XM8/Functions/fn_createCtrlGrp.sqf @@ -0,0 +1,11 @@ +params ["_display","_parent","_idc","_position","_speed","_delay","_rewind","_ctrl"]; + +_ctrl = _display ctrlCreate ["RscControlsGroup", _idc, _parent]; +_ctrl ctrlSetPosition _position; +_ctrl ctrlSetAutoScrollSpeed _speed; +_ctrl ctrlSetAutoScrollDelay _delay; +_ctrl ctrlSetAutoScrollRewind _rewind; +_ctrl ctrlEnable false; +_ctrl ctrlCommit 0; + +_ctrl \ No newline at end of file diff --git a/mpmissions/Exile.Altis/config.cpp b/mpmissions/Exile.Altis/config.cpp index e7e8bea..2437b6d 100644 --- a/mpmissions/Exile.Altis/config.cpp +++ b/mpmissions/Exile.Altis/config.cpp @@ -1,14 +1,22 @@ class CfgXM8 { - extraApps[] = {"ExAd_VG"}; + extraApps[] = {"ExAd_VG","ExAd_Info"}; class ExAd_VG { title = "Virtual Garage"; - controlID = 50000; //IDC:50000 -> 50014 + controlID = 50000; //IDC:50000 -> 50014 || These need to be unique onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf"; onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf"; onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf"; + }; + class ExAd_Info + { + title = "Server Info"; + controlID = 50100; //IDC:50100 -> 50101 || These need to be unique + onLoad = "ExAdClient\XM8\Apps\Info\onLoad.sqf"; + onOpen = "ExAdClient\XM8\Apps\Info\onOpen.sqf"; + onClose = "ExAdClient\XM8\Apps\Info\onClose.sqf"; }; };