diff --git a/AL.ini b/AL.ini index b23904e72..3d9b0270f 100755 --- a/AL.ini +++ b/AL.ini @@ -30,7 +30,8 @@ SQL1_1 = CALL deleteOldGangs [deleteOldContainers] SQL1_1 = CALL deleteOldContainers - +[deleteOldWanted] +SQL1_1 = CALL deleteOldWanted [checkPlayerExists] SQL1_1 = SELECT pid, name FROM players WHERE pid = ? @@ -120,8 +121,6 @@ SQL1_INPUTS = 1, 2 SQL1_1 = UPDATE players SET cash = ?, bankacc = ? WHERE pid = ? SQL1_INPUTS = 1, 2, 3 - - [selectPlayerGang] SQL1_1 = SELECT id, owner, name, maxmembers, bank, members FROM gangs WHERE active = '1' AND members LIKE ? SQL1_INPUTS = 1 @@ -175,8 +174,6 @@ SQL1_INPUTS = 1, 2, 3 SQL1_1 = UPDATE gangs SET active = '0' WHERE id = ? SQL1_INPUTS = 1 - - [insertHouse] SQL1_1 = INSERT INTO houses (pid, pos, owned) VALUES (?, ?, '1') SQL1_INPUTS = 1, 2 @@ -244,9 +241,6 @@ SQL1_INPUTS = 1, 2 SQL1_1 = UPDATE containers SET owned = '0', pos = '[]' WHERE id = ? SQL1_INPUTS = 1 - - - [selectVehicles] SQL1_1 = SELECT id, side, classname, type, pid, alive, active, plate, color FROM vehicles WHERE pid = ? AND alive = '1' AND active = '0' AND side = ? AND type = ? SQL1_INPUTS = 1, 2, 3 @@ -301,7 +295,6 @@ SQL1_INPUTS = 1, 2 SQL1_1 = UPDATE vehicles SET active = '0', fuel = ? WHERE pid = ? AND plate = ? SQL1_INPUTS = 1, 2, 3 - [selectWanted] SQL1_1 = SELECT wantedID, wantedName, wantedCrimes, wantedBounty FROM wanted WHERE active = '1' AND wantedID = ? SQL1_INPUTS = 1 diff --git a/Altis_Life.Altis/core/actions/fn_catchFish.sqf b/Altis_Life.Altis/core/actions/fn_catchFish.sqf index 20df700d4..ddfc1f1a3 100644 --- a/Altis_Life.Altis/core/actions/fn_catchFish.sqf +++ b/Altis_Life.Altis/core/actions/fn_catchFish.sqf @@ -35,7 +35,7 @@ if (_fishType isEqualTo "") exitWith {}; //Couldn't get a type private _fishName = localize _fishName; //--- Add fish into inventory -if ([true,_type,1] call life_fnc_handleInv) then { +if ([true,_fishType,1] call life_fnc_handleInv) then { //--- Delete fish in water deleteVehicle _fish; diff --git a/Altis_Life.Altis/dialog/impound.hpp b/Altis_Life.Altis/dialog/impound.hpp index fd58e4beb..97edcfb21 100644 --- a/Altis_Life.Altis/dialog/impound.hpp +++ b/Altis_Life.Altis/dialog/impound.hpp @@ -76,7 +76,7 @@ class Life_impound_menu { class SellCar: Life_RscButtonMenu { idc = -1; text = "$STR_Global_Sell"; - onButtonClick = "closeDialog 0; [] spawn life_fnc_sellGarage;"; + onButtonClick = "[] spawn life_fnc_sellGarage;"; x = 0.26 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.9 - (1 / 25); w = (6.25 / 40); diff --git a/life_server/Functions/Systems/fn_cleanup.sqf b/life_server/Functions/Systems/fn_cleanup.sqf index f1e6fe0d1..b78ef4f9f 100755 --- a/life_server/Functions/Systems/fn_cleanup.sqf +++ b/life_server/Functions/Systems/fn_cleanup.sqf @@ -58,10 +58,20 @@ private _fnc_cleanVehicles = { } count (allMissionObjects "Thing"); }; +private _fnc_cleanDatabase = { + ["resetLifeVehicles", 1] call DB_fnc_asyncCall; + ["deleteDeadVehicles", 1] call DB_fnc_asyncCall; + ["deleteOldHouses", 1] call DB_fnc_asyncCall; + ["deleteOldGangs", 1] call DB_fnc_asyncCall; + ["deleteOldContainers", 1] call DB_fnc_asyncCall; + ["deleteOldWanted", 1] call DB_fnc_asyncCall; +}; + //Array format: [parameters,function,delayTime] private _routines = [ [[], _fnc_fedDealerUpdate, 1800], - [[], _fnc_cleanVehicles, 3600] + [[], _fnc_cleanVehicles, 3600], + [[], _fnc_cleanDatabase, 3600] ]; { diff --git a/life_server/init.sqf b/life_server/init.sqf index 7a2a63262..653c5ea18 100644 --- a/life_server/init.sqf +++ b/life_server/init.sqf @@ -70,6 +70,8 @@ publicVariable "life_server_extDB_notLoaded"; ["deleteDeadVehicles", 1] call DB_fnc_asyncCall; ["deleteOldHouses", 1] call DB_fnc_asyncCall; ["deleteOldGangs", 1] call DB_fnc_asyncCall; +["deleteOldContainers", 1] call DB_fnc_asyncCall; +["deleteOldWanted", 1] call DB_fnc_asyncCall; _timeStamp = diag_tickTime; diag_log "----------------------------------------------------------------------------------------------------";