Wie kann man einschrencken das nur einer in das T inventar von Fahrzeugen Zugreiffen kann ?
T Inventar Zugriff
-
Lukas_Multi -
11. August 2016 um 13:55 -
Geschlossen -
Erledigt
-
-
Hat keiner eine Idee ?
-
Wie kann man einschrencken das nur einer in das T inventar von Fahrzeugen Zugreiffen kann ?
In der openInventory.sqf im core/vehicle Ordner, das oben einfügen
Spoiler anzeigen
if(!(player in car)) exitWith {};und das entfernen:
Spoiler anzeigen
if(player != vehicle player) exitWith {titleText[localize "STR_NOTF_ActionInVehicle","PLAIN"];}; -
Ich habe das selbe Problem. Den Code den @Flyyying_nflug gepostet hat finde ich nicht. Hier ist mal meine Datei:
Code
Alles anzeigen/* File: fn_openInventory.sqf Author: Bryan "Tonic" Boardwine Description: Starts the initialization of vehicle virtual inventory menu. */ private["_vehicle","_veh_data"]; if(dialog) exitWith {}; _vehicle = [_this,0,Objnull,[Objnull]] call BIS_fnc_param; if(isNull _vehicle OR !(_vehicle isKindOf "Car" OR _vehicle isKindOf "Air" OR _vehicle isKindOf "Ship" OR _vehicle isKindOf "House_F" OR _vehicle isKindOF "Box")) exitWith {}; //Either a null or invalid vehicle type. if((_vehicle getVariable ["trunk_in_use",false])) exitWith {hint localize "STR_MISC_VehInvUse"}; _vehicle setVariable["trunk_in_use_by",name player,true]; if(!createDialog "TrunkMenu") exitWith {hint localize "STR_MISC_DialogError";}; //Couldn't create the menu? disableSerialization; [_vehicle] call life_fnc_updateVehTrunk; if(_vehicle isKindOf "House_F") then { ctrlSetText[3501,format[(localize "STR_MISC_HouseStorage")+ " - %1",getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")]]; } else { ctrlSetText[3501,format[(localize "STR_MISC_VehStorage")+ " - %1",getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")]]; }; [_vehicle] call life_fnc_updateVehTrunk; if(_vehicle isKindOf "House_F") then { private["_mWeight"]; _mWeight = 0; {_mWeight = _mWeight + ([(typeOf _x)] call life_fnc_vehicleWeightCfg);} foreach (_vehicle getVariable["containers",[]]); _veh_data = [_mWeight,(_vehicle getVariable["Trunk",[[],0]]) select 1]; } else { _veh_data = [_vehicle] call life_fnc_vehicleWeight; }; if(_vehicle isKindOf "House_F" && {count (_vehicle getVariable ["containers",[]]) == 0}) exitWith {hint localize "STR_MISC_NoStorageWarn"; closeDialog 0; _vehicle setVariable["trunk_in_use",false,true];}; if(_veh_data select 0 == -1 && {!(_vehicle isKindOf "House_F")}) exitWith {closeDialog 0; _vehicle setVariable["trunk_in_use",false,true]; hint localize "STR_MISC_NoStorageVeh";}; ctrlSetText[3504,format[(localize "STR_MISC_Weight")+ " %1/%2",_veh_data select 1,_veh_data select 0]]; [_vehicle] call life_fnc_vehInventory; life_trunk_vehicle = _vehicle; _vehicle spawn { waitUntil {isNull (findDisplay 3500)}; _this setVariable["trunk_in_use",false,true]; if(_this isKindOf "House_F") then { [[_this],"TON_fnc_updateHouseTrunk",false,false] spawn life_fnc_MP; }; };
-
-
Ich habe das selbe Problem. Den Code den @Flyyying_nflug gepostet hat finde ich nicht. Hier ist mal meine Datei:
Code
Alles anzeigen/* File: fn_openInventory.sqf Author: Bryan "Tonic" Boardwine Description: Starts the initialization of vehicle virtual inventory menu. */ private["_vehicle","_veh_data"]; if(dialog) exitWith {}; _vehicle = [_this,0,Objnull,[Objnull]] call BIS_fnc_param; if(isNull _vehicle OR !(_vehicle isKindOf "Car" OR _vehicle isKindOf "Air" OR _vehicle isKindOf "Ship" OR _vehicle isKindOf "House_F" OR _vehicle isKindOF "Box")) exitWith {}; //Either a null or invalid vehicle type. if((_vehicle getVariable ["trunk_in_use",false])) exitWith {hint localize "STR_MISC_VehInvUse"}; _vehicle setVariable["trunk_in_use_by",name player,true]; if(!createDialog "TrunkMenu") exitWith {hint localize "STR_MISC_DialogError";}; //Couldn't create the menu? disableSerialization; [_vehicle] call life_fnc_updateVehTrunk; if(_vehicle isKindOf "House_F") then { ctrlSetText[3501,format[(localize "STR_MISC_HouseStorage")+ " - %1",getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")]]; } else { ctrlSetText[3501,format[(localize "STR_MISC_VehStorage")+ " - %1",getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")]]; }; [_vehicle] call life_fnc_updateVehTrunk; if(_vehicle isKindOf "House_F") then { private["_mWeight"]; _mWeight = 0; {_mWeight = _mWeight + ([(typeOf _x)] call life_fnc_vehicleWeightCfg);} foreach (_vehicle getVariable["containers",[]]); _veh_data = [_mWeight,(_vehicle getVariable["Trunk",[[],0]]) select 1]; } else { _veh_data = [_vehicle] call life_fnc_vehicleWeight; }; if(_vehicle isKindOf "House_F" && {count (_vehicle getVariable ["containers",[]]) == 0}) exitWith {hint localize "STR_MISC_NoStorageWarn"; closeDialog 0; _vehicle setVariable["trunk_in_use",false,true];}; if(_veh_data select 0 == -1 && {!(_vehicle isKindOf "House_F")}) exitWith {closeDialog 0; _vehicle setVariable["trunk_in_use",false,true]; hint localize "STR_MISC_NoStorageVeh";}; ctrlSetText[3504,format[(localize "STR_MISC_Weight")+ " %1/%2",_veh_data select 1,_veh_data select 0]]; [_vehicle] call life_fnc_vehInventory; life_trunk_vehicle = _vehicle; _vehicle spawn { waitUntil {isNull (findDisplay 3500)}; _this setVariable["trunk_in_use",false,true]; if(_this isKindOf "House_F") then { [[_this],"TON_fnc_updateHouseTrunk",false,false] spawn life_fnc_MP; }; };
Wenn du nicht findest was du entfernen sollst ist das doch gut :P. Dann musst du nur noch das weiter oben einfügen:
Spoiler anzeigen
if(!(player in car)) exitWith {}; -
Hab ich das geht, dewegen frag ich ja
-
Sorry ich meinte lolyou ... hätte dazu dazu schrieben sollen.
Du hast bereits die Zeilen zugefügt und ihr könnt trotzdem gleichzeitig drauf zugreife? -
Ja wurde gefixt. Danke
#Close