ross8839 10 Posted January 27, 2014 I have tried editing the following files in the Altis Life core folder but unfortunately couldn't get clothes to save. I tried adding the item as an allowed item on both, but that didn't work so has anyone got any idea of how I can make additional clothes save? Load Gear File: /* File: fn_loadGear.sqf Author: Bryan "Tonic" Boardwine Description: Used for loading cop saved gear loadout. */ private["_allowedItems","_loadout","_primary","_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_handle"]; _loadout = cop_gear; _allowedItems = [ "arifle_sdar_F", "hgun_P07_snds_F", "hgun_p07_F", "arifle_MX_F", "SMG_02_ACO_F", "optic_Holosight", "acc_flashlight", "arifle_MXC_F", "arifle_MXM_F", "optic_Arco", "optic_MRCO", "muzzle_snds_H", "muzzle_snds_L" ]; if(isNil "_loadout") exitWith {[] call life_fnc_copDefault;}; //Slot data doesn't exist if(count _loadout == 0) exitWith {[] call life_fnc_copDefault;}; //Slot data doesn't exist _primary = _loadout select 0; _launcher = ""; _handgun = _loadout select 1; _magazines = _loadout select 2; _uniform = _loadout select 3; _vest = _loadout select 4; _backpack = _loadout select 5; _items = _loadout select 6; _primitems = _loadout select 7; _secitems = _loadout select 8; _handgunitems = _loadout select 9; _uitems = _loadout select 10; _vitems = _loadout select 11; _bitems = _loadout select 12; //This is to piss off cops :) if(!(_primary in _allowedItems)) then {_primary = ""}; if(!(_handgun in _allowedItems)) then {_handgun = ""}; //Strip the unit down RemoveAllWeapons player; {player removeMagazine _x;} foreach (magazines player); removeUniform player; removeVest player; removeBackpack player; removeGoggles player; removeHeadGear player; { player unassignItem _x; player removeItem _x; } foreach (assignedItems player); //Add the gear if(_uniform != "") then {_handle = [_uniform,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if(_vest != "") then {_handle = [_vest,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if(_backpack != "") then {_handle = [_backpack,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; { _handle = [_x,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle}; } foreach _magazines; if(_primary != "") then {[_primary,true,false,false,false] spawn life_fnc_handleItem;}; if(_launcher != "") then {[_launcher,true,false,false,false] spawn life_fnc_handleItem;}; if(_handgun != "") then {[_handgun,true,false,false,false] spawn life_fnc_handleItem;}; {_handle = [_x,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};} foreach _items; {[_x,true,false,false,true] call life_fnc_handleItem;} foreach (_uitems); {[_x,true,false,false,true] call life_fnc_handleItem;} foreach (_vitems); {[_x,true,true,false,false] call life_fnc_handleItem;} foreach (_bitems); {[_x,true,false,true,false] call life_fnc_handleItem;} foreach (_primitems); {[_x,true,false,true,false] call life_fnc_handleItem;} foreach (_secitems); {[_x,true,false,true,false] call life_fnc_handleItem;} foreach (_handgunitems); if(primaryWeapon player != "") then { player selectWeapon (primaryWeapon player); }; Save Gear File: /* File: fn_saveGear.sqf Author: Bryan "Tonic" Boardwine Description: Saves the player / cops gear in a formatted array. */ private["_allowedItems","_primary","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_curWep"]; //Pre-approved weapons / attachments _allowedItems = [ "arifle_sdar_F", "hgun_P07_snds_F", "hgun_p07_F", "arifle_MX_F", "SMG_02_ACO_F", "optic_Holosight", "acc_flashlight", "arifle_MXC_F", "arifle_MXM_F", "optic_Arco", "optic_MRCO", "muzzle_snds_H", "muzzle_snds_L" ]; //Old format / code _primary = primaryWeapon player; _handgun = handGunWeapon player; _magazines = []; _uniform = uniform player; _vest = vest player; _backpack = backpack player; _items = assignedItems player; _primitems = primaryWeaponItems player; _secitems = secondaryWeaponItems player; _handgunitems = handGunItems player; _uitems = []; _vitems = []; _bitems = []; if(!(_primary in _allowedItems)) then {_primary = ""}; if(!(_handgun in _allowedItems)) then {_handgun = ""}; if(_uniform != "") then {{_uitems set[count _uitems,_x];} foreach (uniformItems player);}; if(_vest != "") then {{_vitems set[count _vitems,_x];} foreach (vestItems player);}; if(_backpack != "") then {{_bitems set[count _bitems,_x];} foreach (backPackItems player);}; if(goggles player != "") then { _items set[count _items, goggles player]; }; if(headgear player != "") then { _items set[count _items, headgear player]; }; if(count (primaryWeaponMagazine player) > 0) then { { _magazines set[count _magazines,_x]; } foreach (primaryWeaponMagazine player); }; if(count (handgunMagazine player) > 0) then { { _magazines set[count _magazines,_x]; } foreach (handgunMagazine player); }; //Hard code for Laser Desigantor batteries _curWep = currentWeapon player; if("Laserdesignator" in assignedItems player) then { player selectWeapon "Laserdesignator"; if(currentMagazine player != "") then {_magazines set[count _magazines,(currentMagazine player)];}; }; player selectWeapon _curWep; cop_gear = [_primary,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems]; Share this post Link to post Share on other sites
ross8839 10 Posted January 28, 2014 Bump - it's only for cops, clothes save for civilians. There has to be someone here that know the fix to my problem :( Share this post Link to post Share on other sites
MarquiseDeSade 10 Posted March 4, 2014 Yes that is very interesting. It would be great to know how to do that.;) Share this post Link to post Share on other sites
fusion13 11 Posted March 4, 2014 Create a new SQL entry? Share this post Link to post Share on other sites