Armed-Assault.de Twitter
Antwort
 
Themen-Optionen Ansicht
Alt 13.05.2014, 22:45   #1 (permalink)
Newbie
 
Registriert seit: 13.04.2014
Beiträge: 14
Standard Brillen und Kopfbedeckung Saven?

Guten Tag,

ich habe das Problem, das auf meinem Server Die Brillen und Kopfbedeckungen nicht gesavt werden. Alles andere klappt wunderbar.
Gibt es bestimmte befehle die ich noch in die Save Gear Dateien schreiben muss damit auch diese speichern? Was hab ich übersehen?



SaveGear.sqf

Code:
/*
File: fn_fetchGear.sqf
Author: Bryan "Tonic" Boardwine

Description:
Fetches the players current gear and returns it in the correct formatted array.

Using the FeatchGear of cops
Because tonics balance is crap
*/
private["_primary,_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_headgear","_goggles"];

_primitems = [];
_secitems = [];
_handgunitems = [];
_primary = primaryWeapon player;
_launcher = secondaryWeapon player;
_handgun = handGunWeapon player;
_magazines = [];
_uniform = uniform player;
_vest = vest player;
_backpack = backpack player;
_items = assignedItems player;
if(primaryWeapon player != "") then {_primitems = primaryWeaponItems player;};
if(handgunWeapon player != "") then {_handgunItems = handgunItems player;};
_headgear = headgear player;
_goggles = goggles player;
_uitems = [];
_vitems = [];
_bitems = [];
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(primaryWeapon player != "") then
{
player selectWeapon (primaryWeapon player);
if(currentMagazine player != "") then
{
_magazines set[count _magazines,currentMagazine player];
};
};

if(secondaryWeapon player != "") then
{
player selectWeapon (secondaryWeapon player);
if(currentMagazine player != "") then
{
_magazines set[count _magazines,currentMagazine player];
};
};

if(handgunWeapon player != "") then
{
player selectWeapon (handgunWeapon player);
if(currentMagazine player != "") then
{
_magazines set[count _magazines,currentMagazine player];
};
};
player selectWeapon (primaryWeapon player);

if(isNil "_handgunItems") then {_handgunItems = ["","",""];};

//using civ format for compatibility issues
//uniform,backpack,goggles,headgear,assigneditems,uitems,bitems, |vest,primary,launcher,handgun,magazines,primitems,secitems,handgunitems,vitems
//[_primary,_launcher,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems,_headgear,_goggles];

if(life_n_holstered) then
{
//Translate holster gear to civ gear
//_primary,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems,_launcher
_primary = life_n_holster_data select 0;
_handgun = life_n_holster_data select 1;
_magazines = life_n_holster_data select 2;
_uniform = life_n_holster_data select 3;
_vest = life_n_holster_data select 4;
_backpack = life_n_holster_data select 5;
_items = life_n_holster_data select 6;
_primitems = life_n_holster_data select 7;
_secitems = life_n_holster_data select 8;
_handgunItems = life_n_holster_data select 9;
_uitems = life_n_holster_data select 10;
_vitems = life_n_holster_data select 11;
_bItems = life_n_holster_data select 12;
_launcher = life_n_holster_data select 13;
};

civ_gear = [_uniform,_backpack,_goggles,_headgear,_items,_uitems,_bItems,_vest,_primary,_launcher,_handgun,_magazines,_primitems,_secitems,_handgunItems,_vitems];


/*
File: fn_civFetchGear.sqf
Author: Bryan "Tonic" Boardwine

Description:
Fetches specific key items from the civilian for a persistent state.
*/
/*private["_ret","_uItems","_bItems"];
_ret = [];

_ret set[count _ret,uniform player];
_ret set[count _ret,backpack player];
_ret set[count _ret,goggles player];
_ret set[count _ret,headgear player];
_ret set[count _ret,assignedItems player];

_uItems = [];
_bItems = [];

if(uniform player != "") then
{
{
_info = [_x] call life_fnc_fetchCfgDetails;
if((_info select 4) in [4096,131072]) then
{
_uItems set[count _uItems,_x];
};
} foreach (uniformItems player);
};

if(backpack player != "") then
{
{
_info = [_x] call life_fnc_fetchCfgDetails;
if((_info select 4) in [4096,131072]) then
{
_uItems set[count _uItems,_x];
};
} foreach (backpackItems player);
};

_ret set[count _ret,_uItems];
_ret set[count _ret,_bItems];

civ_gear = _ret;*/
LoadGear.sqf

Code:
/*
File: fn_civLoadGear.sqf
Author: Bryan "Tonic" Boardwine

Description:
Loads saved civilian gear, this is limited for a reason and that's balance.

But this balance is shit and is overwritten by default gear functions
*/
private["_allowedItems","_loadout","_primary","_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_handle","_append","__restwp"];

//systemChat "civLoadGear 1";

/*if(isNil("_this")) then
{
_this = [true];
};

__restwp = [_this, 0, true] call BIS_fnc_param;

if(!__restwp) then
{
systemChat "Weapons will not be restored";
};*/

_loadout = civ_gear;

if(isNil "_loadout") exitWith {[] call life_fnc_civDefault;}; //Slot data doesn't exist
if(count _loadout == 0) exitWith {[] call life_fnc_civDefault;}; //Slot data doesn't exist

//systemChat format["Loadout: %1", str _loadout];

//systemChat str _this;

//using civ format for compatibility issues
//uniform,backpack,goggles,headgear,assigneditems,uitems,bitems, |primary,launcher,handgun,magazines,primitems,secitems,handgunitems,vitems
//TODO
//civ_gear = [_uniform,_backpack,_goggles,_headgear,_items,_uitems,_bItems,_vest,_primary,_launcher,_handgun,_magazines,_primitems,_secitems,_handgunItems,_vitems];
_uniform = _loadout select 0;
_backpack = _loadout select 1;
_goggles = _loadout select 2;
_headgear = _loadout select 3;
_items = _loadout select 4;
_uitems = _loadout select 5;
_bItems = _loadout select 6;

//new sections
_vest = [_loadout,7,""] call BIS_fnc_param;
_primary = [_loadout,8,""] call BIS_fnc_param;
_launcher = [_loadout,9,""] call BIS_fnc_param;
_handgun = [_loadout,10,""] call BIS_fnc_param;
_magazines = [_loadout,11,[]] call BIS_fnc_param;
_primitems = [_loadout,12,[]] call BIS_fnc_param;
_secitems = [_loadout,13,[]] call BIS_fnc_param;
_handgunitems = [_loadout,14,[]] call BIS_fnc_param;
_vitems = [_loadout,15,[]] call BIS_fnc_param;

/*_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 :)
//NO, to piss off programmers!!! -.-
//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};
}
else
{
//Add default uniform
_handle = ["U_C_Poloshirt_blue",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 ["ItemCompass","ItemMap","ItemRadio","ItemWatch"];
};

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;};

//if(__restwp) then
//{
{_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);
};

//Update clothing ##86
[] spawn life_fnc_updateClothing;


/*private["_itemArray","_uniform","_backpack","_goggles","_headgear","_itemArray","_uItems","_bItems","_handle"];
_itemArray = civ_gear;
waitUntil {!(isNull (findDisplay 46))};
if(count _itemArray == 0) exitWith 
{
if(headGear player != "") then {removeHeadgear player;};
if(goggles player != "") then {removeGoggles player;};
};

//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);

_uniform = [_itemArray,0,"",[""]] call BIS_fnc_param;
_backpack = [_itemArray,1,"",[""]] call BIS_fnc_param;
_goggles = [_itemArray,2,"",[""]] call BIS_fnc_param;
_headgear = [_itemArray,3,"",[""]] call BIS_fnc_param;
_items = [_itemArray,4,[],[[]]] call BIS_fnc_param;
_uItems = [_itemArray,5,[],[[]]] call BIS_fnc_param;
_bItems = [_itemArray,6,[],[[]]] call BIS_fnc_param;

if(_uniform != "") then {_handle = [_uniform,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};};
if(_goggles != "") then {_handle = [_goggles,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};};
if(_headgear != "") then {_handle = [_headgear,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 _items;
{[_x,true,false,false,true] call life_fnc_handleItem;} foreach (_uItems);
{[_x,true,true,false,false] call life_fnc_handleItem;} foreach (_bItems);

//##19
player additem "ItemCompass"; player assignItem "ItemCompass";
player additem "ItemMap"; player assignItem "ItemMap";
player additem "ItemRadio"; player assignItem "ItemRadio";
player additem "ItemWatch"; player assignItem "ItemWatch";*/
Bahlramir ist offline   Mit Zitat antworten
Antwort


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus


Kontakt - HX3.de - Archiv - Nach oben

Angetrieben durch vBulletin, Entwicklung von Philipp Dörner & Tobias



SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116