diff --git a/Altis_Life.Altis/config/Config_Master.hpp b/Altis_Life.Altis/config/Config_Master.hpp index ee56fada6..bb50a1c53 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 + 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/Altis_Life.Altis/stringtable.xml b/Altis_Life.Altis/stringtable.xml index bc3cd7fe1..7d45f9ba8 100644 --- a/Altis_Life.Altis/stringtable.xml +++ b/Altis_Life.Altis/stringtable.xml @@ -2552,7 +2552,19 @@ 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..9f27bba11 100755 --- a/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf +++ b/life_hc/MySQL/Vehicles/fn_vehicleStore.sqf @@ -68,7 +68,14 @@ 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,"vehicle_rentalReturn") 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"; }; diff --git a/life_server/Functions/Systems/fn_vehicleStore.sqf b/life_server/Functions/Systems/fn_vehicleStore.sqf index b93bf8668..5b56d6ab3 100755 --- a/life_server/Functions/Systems/fn_vehicleStore.sqf +++ b/life_server/Functions/Systems/fn_vehicleStore.sqf @@ -67,7 +67,14 @@ 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,"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; + }; + } else { + [1,"STR_Garage_Store_NotPersistent",true] remoteExecCall ["life_fnc_broadcast",(owner _unit)]; + }; life_garage_store = false; (owner _unit) publicVariableClient "life_garage_store"; };