mirror of
https://github.com/ravmustang/PTWS.git
synced 2024-08-30 17:22:14 +00:00
Fix and 64bit upgrade
This commit is contained in:
parent
39aaed2c2c
commit
f26bf3031f
5
PTWS.ini
5
PTWS.ini
@ -1,6 +1,11 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; PTWS
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[isKnownPTWSID]
|
||||
SQL1_1 = SELECT CASE WHEN EXISTS(SELECT DateID FROM ptws WHERE DateID = ?) THEN 'true' ELSE 'false' END
|
||||
Number Of Inputs = 1
|
||||
SQL1_INPUTS = 1
|
||||
OUTPUT = 1
|
||||
|
||||
[createDate]
|
||||
SQL1_1 = INSERT INTO ptws SET DateID = ?
|
||||
|
29
PTWS_x64.ini
Normal file
29
PTWS_x64.ini
Normal file
@ -0,0 +1,29 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; PTWS
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
[isKnownPTWSID]
|
||||
SQL1_1 = SELECT CASE WHEN EXISTS(SELECT DateID FROM ptws WHERE DateID = ?) THEN 'true' ELSE 'false' END
|
||||
SQL1_INPUTS = 1
|
||||
OUTPUT = 1
|
||||
|
||||
[createDate]
|
||||
SQL1_1 = INSERT INTO ptws SET DateID = ?
|
||||
SQL1_INPUTS = 1
|
||||
|
||||
[getDate]
|
||||
SQL1_1 = SELECT date FROM ptws WHERE DateID = ?
|
||||
SQL1_INPUTS = 1
|
||||
OUTPUT = 1
|
||||
|
||||
[getWeather]
|
||||
SQL1_1 = SELECT weather FROM ptws WHERE DateID = ?
|
||||
SQL1_INPUTS = 1
|
||||
OUTPUT = 1
|
||||
|
||||
[setDate]
|
||||
SQL1_1= UPDATE ptws SET date = ? WHERE DateID = ?
|
||||
SQL1_INPUTS = 1,2
|
||||
|
||||
[setWeather]
|
||||
SQL1_1= UPDATE ptws SET weather = ? WHERE DateID = ?
|
||||
SQL1_INPUTS = 1,2
|
@ -24,7 +24,8 @@ PTWS is a script made for Exile that allows time and weather to persist through
|
||||
|
||||
2) You should now have a ptws table.
|
||||
|
||||
3) Copy the contents of `PTWS.ini` into your `@ExileServer\extDB\sql_custom_v2\exile.ini` file at the bottom.
|
||||
3) For 32bit: Copy the contents of `PTWS.ini` into your `@ExileServer\extDB\sql_custom_v2\exile.ini` file at the bottom.
|
||||
3) For 64bit: Copy the contents of `PTWS_x64.ini` into your `@extdb3\sql_custom\exile.ini` file at the bottom.
|
||||
|
||||
##### Server
|
||||
1) Take either the PTWS.pbo or the file and put it in your `@ExileServer\addons`. Use the file if you want to configure the settings and pack it after you're done.
|
||||
|
Binary file not shown.
@ -11,7 +11,12 @@
|
||||
diag_log "PTWS - Initialized";
|
||||
|
||||
// Start PTWS
|
||||
[]execVM "\PTWS\scripts\insertPTWS.sqf";
|
||||
//DonkeyPunch - DirtySanchez add database check for known ID if none then populate it with config setup information
|
||||
_isKnownPTWSDateID = format ["isKnownPTWSID:%1", PTWS_ID] call ExileServer_system_database_query_selectSingleField;
|
||||
if!(_isKnownPTWSDateID)then
|
||||
{
|
||||
_insertPTWSDateID = format["createDate:%1", PTWS_ID] call ExileServer_system_database_query_insertSingle;
|
||||
};
|
||||
sleep 1;
|
||||
[]execVM "\PTWS\scripts\startPTWS.sqf";
|
||||
};
|
||||
|
@ -5,8 +5,8 @@ _checkDatabaseID = profileNamespace getVariable ["PTWS_DatabaseID",false];
|
||||
|
||||
if !(_checkDatabaseID isEqualTo PTWS_ID) then
|
||||
{
|
||||
profileNamespace setVariable ["PTWS_DatabaseID",PTWS_ID];
|
||||
saveProfileNamespace;
|
||||
_insertDatabaseID = format["createDate:%1", PTWS_ID] call ExileServer_system_database_query_insertSingle;
|
||||
_insertDatabaseID;
|
||||
profileNamespace setVariable ["PTWS_DatabaseID",PTWS_ID];
|
||||
saveProfileNamespace;
|
||||
_insertDatabaseID = format["createDate:%1", PTWS_ID] call ExileServer_system_database_query_insertSingle;
|
||||
_insertDatabaseID;
|
||||
};
|
@ -3,7 +3,7 @@ if (!isServer) exitWith {};
|
||||
|
||||
_saveddate = format ["getDate:%1", PTWS_ID] call ExileServer_system_database_query_selectSingleField;
|
||||
_savedWeather = format ["getWeather:%1", PTWS_ID] call ExileServer_system_database_query_selectSingleField;
|
||||
|
||||
diag_log format["PTWSDebug:db data - date:%1 weather:%2",_saveddate,_savedWeather];
|
||||
if (typeName _saveddate isEqualTo "ARRAY") then
|
||||
{
|
||||
diag_log format["PTWS - Loading last saved date : %1", _saveddate];
|
||||
|
Loading…
Reference in New Issue
Block a user