Added Server Info App

Added Server Info App
This commit is contained in:
Bjanski 2016-07-05 01:52:05 +02:00
parent fc976938f4
commit df832a5932
9 changed files with 107 additions and 2 deletions

View File

@ -34,6 +34,7 @@ if!(isNil "ExAd_VG_CLEAN_ON_STORE")then{
clearItemCargoGlobal _objVeh;
clearMagazineCargoGlobal _objVeh;
clearWeaponCargoGlobal _objVeh;
_objVeh setVariable ["ExileMoney", 0, true];
}
};

View File

@ -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

View File

@ -0,0 +1,11 @@
<t align='center' color='#E48A36'>GENERAL RULES</t><br />
______________________________________________________________________________<br />
<br /><t color='#E48A36'>SIDE-CHAT</t><br />
______________________________________________________________________________<br />
<t color='#E48A36'>GREEN TRADE-ZONE RULES</t><br />
______________________________________________________________________________<br />
<t color='#E48A36'>BUILDING RULES</t><br />
______________________________________________________________________________<br />

View File

@ -0,0 +1,3 @@
if (ExileClientXM8CurrentSlide == "ExAd_Info") then {
ExileClientXM8CurrentSlide = "apps";
};

View File

@ -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

View File

@ -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
}

View File

@ -23,6 +23,7 @@ file = "ExAdClient\XM8\Functions";
class createBackgroundGUI {};
class createButton {};
class createCheckBox {};
class createCtrlGrp {};
class createExtraApps {};
class createFrame {};
class createList {};

View File

@ -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

View File

@ -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";
};
};