From 9f3d7af32c1ee9a960148bb192b9192847179aa1 Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 19 Mar 2020 22:09:59 +0100 Subject: [PATCH 1/4] returns rental vehicles --- Altis_Life.Altis/stringtable.xml | 20 +++++++++---------- life_hc/MySQL/Vehicles/fn_vehicleStore.sqf | 3 +++ .../Functions/Systems/fn_vehicleStore.sqf | 3 +++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Altis_Life.Altis/stringtable.xml b/Altis_Life.Altis/stringtable.xml index 3a2699e27..13396b898 100644 --- a/Altis_Life.Altis/stringtable.xml +++ b/Altis_Life.Altis/stringtable.xml @@ -2543,16 +2543,16 @@ 你以 $%1 的价格出售了这辆载具 - That vehicle is a rental and cannot be stored in your garage. - Že vozidlo je půjčovna a nemohou být uloženy ve vaší garáži. - Este vehículo es rentado y no puede ser guardado. - - Mietwagen können nicht in der Garage geparkt werden. - Ce véhicule est une location et ne peut pas être stocké dans votre garage. - Il veicolo è in affitto e non può essere depositato in garage. - Esse veículo é alugado e não pode ser armazenado na garagem. - Pojazd wynajęty, nie możesz go schować w garażu. - 载具是租赁的,不能存放在你的仓库里。 + Thank you for returning the rental vehicle. + Děkujeme za vrácení zapůjčeného vozidla. + Gracias por devolver el vehículo de alquiler. + Спасибо, что вернул автомобиль в аренду. + Vielen Dank für die Rückgabe des Mietwagens. + Nous vous remercions de nous avoir rendu le véhicule de location. + Grazie per aver restituito il veicolo a noleggio. + Obrigado por devolver o veículo alugado. + Dziękuję za zwrot wypożyczonego pojazdu. + 感谢您归还租车。 That vehicle doesn't belong to you therefor you cannot store it in your garage. diff --git a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf index b90d8f176..97a038ed4 100755 --- a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf +++ b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf @@ -71,6 +71,9 @@ if (_vInfo isEqualTo []) exitWith { [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",_ownerID]; life_garage_store = false; _ownerID publicVariableClient "life_garage_store"; + if (!isNil "_vehicle" && {!isNull _vehicle}) then { + deleteVehicle _vehicle; + }; }; if !(_uid isEqualTo getPlayerUID _unit) exitWith { diff --git a/life_server/Functions/Systems/fn_vehicleStore.sqf b/life_server/Functions/Systems/fn_vehicleStore.sqf index b93bf8668..ae4a3667c 100755 --- a/life_server/Functions/Systems/fn_vehicleStore.sqf +++ b/life_server/Functions/Systems/fn_vehicleStore.sqf @@ -70,6 +70,9 @@ if (_vInfo isEqualTo []) exitWith { [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; + if (!isNil "_vehicle" && {!isNull _vehicle}) then { + deleteVehicle _vehicle; + }; }; if !(_uid isEqualTo getPlayerUID _unit) exitWith { From 2452bdfd1a4c7a711e2f9c0e8f7f3fb963d767dc Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 25 Mar 2020 19:12:08 +0100 Subject: [PATCH 2/4] Config option --- Altis_Life.Altis/config/Config_Master.hpp | 1 + Altis_Life.Altis/stringtable.xml | 12 ++++++++++++ life_hc/MySQL/Vehicles/fn_vehicleStore.sqf | 12 ++++++++---- life_server/Functions/Systems/fn_vehicleStore.sqf | 12 ++++++++---- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Altis_Life.Altis/config/Config_Master.hpp b/Altis_Life.Altis/config/Config_Master.hpp index ee56fada6..a5c2e745b 100644 --- a/Altis_Life.Altis/config/Config_Master.hpp +++ b/Altis_Life.Altis/config/Config_Master.hpp @@ -145,6 +145,7 @@ class Life_Settings { vehicle_infiniteRepair[] = {false, false, true, false}; //Set to true for unlimited repairs with 1 toolkit. False will remove toolkit upon use. civilian, west, independent, east vehicleShop_rentalOnly[] = { "B_MRAP_01_hmg_F", "B_G_Offroad_01_armed_F", "B_Boat_Armed_01_minigun_F" }; //Vehicles that can only be rented and not purchased. (Last only for the session) vehicleShop_3D = false; //Add preview 3D inside Shop vehicle. Default : False + rentals_return = false; //Can return rental vehicles to 'Store vehicle in garage', doesn't actually store it in garage. /* Vehicle Purchase Prices */ vehicle_purchase_multiplier_CIVILIAN = 1; //Civilian Vehicle Buy Price = Config_Vehicle price * multiplier diff --git a/Altis_Life.Altis/stringtable.xml b/Altis_Life.Altis/stringtable.xml index 8dde0e9a3..7d45f9ba8 100644 --- a/Altis_Life.Altis/stringtable.xml +++ b/Altis_Life.Altis/stringtable.xml @@ -2543,6 +2543,18 @@ 你以 $%1 的价格出售了这辆载具 + That vehicle is a rental and cannot be stored in your garage. + Že vozidlo je půjčovna a nemohou být uloženy ve vaší garáži. + Este vehículo es rentado y no puede ser guardado. + + Mietwagen können nicht in der Garage geparkt werden. + Ce véhicule est une location et ne peut pas être stocké dans votre garage. + Il veicolo è in affitto e non può essere depositato in garage. + Esse veículo é alugado e não pode ser armazenado na garagem. + Pojazd wynajęty, nie możesz go schować w garażu. + 载具是租赁的,不能存放在你的仓库里。 + + Thank you for returning the rental vehicle. Děkujeme za vrácení zapůjčeného vozidla. Gracias por devolver el vehículo de alquiler. diff --git a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf index 97a038ed4..2ec319bb3 100755 --- a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf +++ b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf @@ -68,12 +68,16 @@ if (_impound) exitWith { // not persistent so just do this! if (_vInfo isEqualTo []) exitWith { - [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",_ownerID]; + if (LIFE_SETTINGS(getNumber,"rentals_return") isEqualTo 1) then { + [1,"STR_Garage_Store_NotPersistent2",true] remoteExecCall ["life_fnc_broadcast",_ownerID]; + if (!isNil "_vehicle" && {!isNull _vehicle}) then { + deleteVehicle _vehicle; + }; + } else { + [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",_ownerID]; + }; life_garage_store = false; _ownerID publicVariableClient "life_garage_store"; - if (!isNil "_vehicle" && {!isNull _vehicle}) then { - deleteVehicle _vehicle; - }; }; if !(_uid isEqualTo getPlayerUID _unit) exitWith { diff --git a/life_server/Functions/Systems/fn_vehicleStore.sqf b/life_server/Functions/Systems/fn_vehicleStore.sqf index ae4a3667c..dfc05362e 100755 --- a/life_server/Functions/Systems/fn_vehicleStore.sqf +++ b/life_server/Functions/Systems/fn_vehicleStore.sqf @@ -67,12 +67,16 @@ if (_impound) exitWith { // not persistent so just do this! if (_vInfo isEqualTo []) exitWith { - [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; + if (LIFE_SETTINGS(getNumber,"rentals_return") isEqualTo 1) isEqualTo 1) then { + [1,"STR_Garage_Store_NotPersistent2",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; + if (!isNil "_vehicle" && {!isNull _vehicle}) then { + deleteVehicle _vehicle; + }; + } else { + [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; + }; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; - if (!isNil "_vehicle" && {!isNull _vehicle}) then { - deleteVehicle _vehicle; - }; }; if !(_uid isEqualTo getPlayerUID _unit) exitWith { From 98297802d87bb740664282e12a0b3b0eab008c6f Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 25 Mar 2020 19:14:00 +0100 Subject: [PATCH 3/4] Fix that weird mistake --- life_server/Functions/Systems/fn_vehicleStore.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/life_server/Functions/Systems/fn_vehicleStore.sqf b/life_server/Functions/Systems/fn_vehicleStore.sqf index dfc05362e..f74a24e16 100755 --- a/life_server/Functions/Systems/fn_vehicleStore.sqf +++ b/life_server/Functions/Systems/fn_vehicleStore.sqf @@ -67,7 +67,7 @@ if (_impound) exitWith { // not persistent so just do this! if (_vInfo isEqualTo []) exitWith { - if (LIFE_SETTINGS(getNumber,"rentals_return") isEqualTo 1) isEqualTo 1) then { + if (LIFE_SETTINGS(getNumber,"rentals_return") isEqualTo 1) then { [1,"STR_Garage_Store_NotPersistent2",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; From 647fecd033f37428e71aeb2bb64d764ce0b50190 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 25 Mar 2020 19:40:55 +0100 Subject: [PATCH 4/4] Naming conventions --- Altis_Life.Altis/config/Config_Master.hpp | 2 +- life_hc/MySQL/Vehicles/fn_vehicleStore.sqf | 2 +- life_server/Functions/Systems/fn_vehicleStore.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Altis_Life.Altis/config/Config_Master.hpp b/Altis_Life.Altis/config/Config_Master.hpp index a5c2e745b..bb50a1c53 100644 --- a/Altis_Life.Altis/config/Config_Master.hpp +++ b/Altis_Life.Altis/config/Config_Master.hpp @@ -145,7 +145,7 @@ class Life_Settings { vehicle_infiniteRepair[] = {false, false, true, false}; //Set to true for unlimited repairs with 1 toolkit. False will remove toolkit upon use. civilian, west, independent, east vehicleShop_rentalOnly[] = { "B_MRAP_01_hmg_F", "B_G_Offroad_01_armed_F", "B_Boat_Armed_01_minigun_F" }; //Vehicles that can only be rented and not purchased. (Last only for the session) vehicleShop_3D = false; //Add preview 3D inside Shop vehicle. Default : False - rentals_return = false; //Can return rental vehicles to 'Store vehicle in garage', doesn't actually store it in garage. + vehicle_rentalReturn = false; //Can return rental vehicles to 'Store vehicle in garage', doesn't actually store it in garage. /* Vehicle Purchase Prices */ vehicle_purchase_multiplier_CIVILIAN = 1; //Civilian Vehicle Buy Price = Config_Vehicle price * multiplier diff --git a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf index 2ec319bb3..9f27bba11 100755 --- a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf +++ b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf @@ -68,7 +68,7 @@ if (_impound) exitWith { // not persistent so just do this! if (_vInfo isEqualTo []) exitWith { - if (LIFE_SETTINGS(getNumber,"rentals_return") isEqualTo 1) then { + if (LIFE_SETTINGS(getNumber,"vehicle_rentalReturn") isEqualTo 1) then { [1,"STR_Garage_Store_NotPersistent2",true] remoteExecCall ["life_fnc_broadcast",_ownerID]; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle; diff --git a/life_server/Functions/Systems/fn_vehicleStore.sqf b/life_server/Functions/Systems/fn_vehicleStore.sqf index f74a24e16..5b56d6ab3 100755 --- a/life_server/Functions/Systems/fn_vehicleStore.sqf +++ b/life_server/Functions/Systems/fn_vehicleStore.sqf @@ -67,7 +67,7 @@ if (_impound) exitWith { // not persistent so just do this! if (_vInfo isEqualTo []) exitWith { - if (LIFE_SETTINGS(getNumber,"rentals_return") isEqualTo 1) then { + if (LIFE_SETTINGS(getNumber,"vehicle_rentalReturn") isEqualTo 1) then { [1,"STR_Garage_Store_NotPersistent2",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; if (!isNil "_vehicle" && {!isNull _vehicle}) then { deleteVehicle _vehicle;