Naiss 28 Posted November 21, 2014 (edited) Lifeman's Storage Function What can this Storage Function do? * Store Vehicles by the players thats owning the vehicle. * Store Your own items. * You can make it save over restarts aswell if you just make L_Veh_Storage and L_Item_Storage save. How would i make a player own a vehicle? Well this is how it works, you would need to make it so when the car spawn or what ever then make it call for a function called: L_Storage_setowner witch is this: L_Storage_setowner = { _veh = cursorTarget; if(!(_veh isKindOf "LandVehicle")) exitWith { hint "You can only do this on Land Vehicles"; }; _veh setVariable [format ["Owner_%1", getPlayerUID player], true]; systemChat format ["Owner set Successfull on: %1", typeof _veh]; }; Exemple when the car spawn: _Car = "Class name" createVehicle (position player); _car addAction ["<t color='#33CC33'>Store vehicle</t>",{[] call L_Storage_input},[false],1,false,true,"","(_this distance _target) < 5"]; _car setVariable [format ["Owner_%1", getPlayerUID player], true]; Download Link: https://www.mediafire.com/?bj3k3agq1f1u5at Edited November 21, 2014 by lifemanlive 1 Share this post Link to post Share on other sites
jshock 513 Posted November 21, 2014 I'm confused by what you mean by storing? Does it lock the vehicle to a certain player, make it so that even if the player leaves and comes back his vehicle is still there? Sorry, it's just a bit unclear to me. Share this post Link to post Share on other sites
Naiss 28 Posted November 21, 2014 you can save your cars in an array, so when ever you click the store vehicle button or action the car will be placed in an array and deleted, then you would need to go to the vehicle storage guy to get it out again. it's just so if you want your cars to be placed some where safe Share this post Link to post Share on other sites
jshock 513 Posted November 21, 2014 Ok, that does make more sense, thanks :p. Share this post Link to post Share on other sites
Persian MO 82 Posted September 1, 2015 Hi. Im trying to make a locker for players and player can save his weapons/items in there and save it for next time he join to server. You can make it save over restarts aswell if you just make L_Veh_Storage and L_Item_Storage save. Can you give me a example how i can to do that? I'm new about saving things and trying to save things via inidpi mod. Share this post Link to post Share on other sites
Persian MO 82 Posted September 3, 2015 I used indpi mod to save cargo. call compile preProcessFile "\inidbi\init.sqf"; _ret = ["testlock", "GLOBAL", "Locker2", L_Item_Storage] call iniDB_write; testlock.ini [GLOBAL] Locker2="[["Chemlight_green","addMagazine"],["30Rnd_65x39_caseless_mag","addMagazine"],["11Rnd_45ACP_Mag","addMagazine"],["11Rnd_45ACP_Mag","addMagazine"],["SmokeShell","addMagazine"],["SmokeShellGreen","addMagazine"],["Chemlight_green","addMagazine"],["arifle_MXC_ACO_F","addWeapon"],["hgun_Pistol_heavy_01_MRD_F","addWeapon"],["FirstAidKit","addItem"],["30Rnd_65x39_caseless_mag","addMagazine"],["30Rnd_65x39_caseless_mag","addMagazine"]]" How to refill cargo when game restart!? _items = ["testlock", "GLOBAL", "Locker2", "ARRAY"] call iniDB_read; ??? Share this post Link to post Share on other sites