Hallo!
Wie der Titel schon sagt, kann ich, die in den Shop eingefügten, ACE 3 Items nicht kaufen.
Das Problem mal genauer beschrieben:
Die Items werden im Shop mit dem richtigen Preis etc. angezeigt und man erhält beim Kauf die Nachricht "Du kaufst ... für Preis$".
Nun das Problem: man erhält die Items nicht in das Inventar.
Kennt da jemand eine Lösung?
Habe bereits den Lösungsansatz auf Seite 2 von diesem Thread ACE 3 Items kann man nicht kaufen [Altis Life v.4.4] ausprobiert, hat allerdings nur dazu geführt, dass man zwar die ACE Items kaufen konnte, allerdings sämtliche anderen Items im Shop dann das oben beschriebene Problem hatten.
Ich poste hier mal den Teil für den entsprechenden Shop aus der fn_weaponShopCfg.sqf.
case "med_basic":
{
switch (true) do
{
case (playerSide != independent): {"Du bist kein Sanitaeter"};
case (!license_med_med): {"Du gehörst nicht zum Sanitätsdienst!"};
default
{
["EMS Shop",
[
["A3L_Extinguisher",nil,100],
["tf_anprc148jem_1","KurzstreckenFunk",100],
["tf_anprc155_coyote","LangstreckenFunk",200],
["ItemGPS",nil,100],
["Binocular",nil,150],
["ToolKit",nil,250],
["FirstAidKit",nil,150],
["Medikit",nil,500],
["Chemlight_red",nil,100],
["NVGoggles",nil,1200],
[" ","----------------------------------------",0],
["ACE_fieldDressing",nil,0],
["ACE_packingBandage",nil,0],
["ACE_elasticBandage",nil,0],
["ACE_tourniquet",nil,0],
["ACE_morphine",nil,0],
["ACE_adenosine",nil,0],
["ACE_atropine",nil,0],
["ACE_epinephrine",nil,0],
["ACE_plasmaIV",nil,0],
["ACE_plasmaIV_500",nil,0],
["ACE_plasmaIV_250",nil,0],
["ACE_salineIV",nil,0],
["ACE_salineIV_500",nil,0],
["ACE_salineIV_250",nil,0],
["ACE_quikclot",nil,0],
["ACE_personalAidKit",nil,0],
["ACE_surgicalKit",nil,0],
["ACE_bodyBag",nil,0],
["ACE_bodyBag",nil,0],
["ACE_EarPlugs",nil,0],
["ACE_bloodIV",nil,0],
["ACE_bloodIV_500",nil,0],
["ACE_bloodIV_250",nil,0]
]
];
};
};
};
Alles anzeigen
Und die fn_weaponShopBuySell.sqf.
#include <macro.h>
/*
File: fn_weaponShopBuySell.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master handling of the weapon shop for buying / selling an item.
*/
disableSerialization;
private["_price","_item","_itemInfo","_bad"];
if((lbCurSel 38403) == -1) exitWith {hint localize "STR_Shop_Weapon_NoSelect"};
_price = lbValue[38403,(lbCurSel 38403)]; if(isNil "_price") then {_price = 0;};
_item = lbData[38403,(lbCurSel 38403)];
_itemInfo = [_item] call life_fnc_fetchCfgDetails;
_bad = "";
if((_itemInfo select 6) != "CfgVehicles") then
{
if((_itemInfo select 4) in [4096,131072]) then
{
if(!(player canAdd _item) && (uiNamespace getVariable["Weapon_Shop_Filter",0]) != 1) exitWith {_bad = (localize "STR_NOTF_NoRoom")};
};
};
if(_bad != "") exitWith {hint _bad};
if((uiNamespace getVariable["Weapon_Shop_Filter",0]) == 1) then
{
life_cash = life_cash + _price;
[_item,false] call life_fnc_handleItem;
hint parseText format[localize "STR_Shop_Weapon_Sold",_itemInfo select 1,[_price] call life_fnc_numberText];
[nil,(uiNamespace getVariable["Weapon_Shop_Filter",0])] call life_fnc_weaponShopFilter; //Update the menu.
}
else
{
private["_hideout"];
_hideout = (nearestObjects[getPosATL player,["Land_u_Barracks_V2_F","Land_i_Barracks_V2_F"],25]) select 0;
if(!isNil "_hideout" && {!isNil {grpPlayer getVariable "gang_bank"}} && {(grpPlayer getVariable "gang_bank") >= _price}) then {
_action = [
format[(localize "STR_Shop_Virt_Gang_FundsMSG")+ "<br/><br/>" +(localize "STR_Shop_Virt_Gang_Funds")+ " <t color='#8cff9b'>$%1</t><br/>" +(localize "STR_Shop_Virt_YourFunds")+ " <t color='#8cff9b'>$%2</t>",
[(grpPlayer getVariable "gang_bank")] call life_fnc_numberText,
[life_cash] call life_fnc_numberText
],
localize "STR_Shop_Virt_YourorGang",
localize "STR_Shop_Virt_UI_GangFunds",
localize "STR_Shop_Virt_UI_YourCash"
] call BIS_fnc_guiMessage;
if(_action) then {
hint parseText format[localize "STR_Shop_Weapon_BoughtGang",_itemInfo select 1,[_price] call life_fnc_numberText];
_funds = grpPlayer getVariable "gang_bank";
_funds = _funds - _price;
grpPlayer setVariable["gang_bank",_funds,true];
[_item,true] spawn life_fnc_handleItem;
[[1,grpPlayer],"TON_fnc_updateGang",false,false] spawn life_fnc_MP;
} else {
if(_price > life_cash) exitWith {hint localize "STR_NOTF_NotEnoughMoney"};
hint parseText format[localize "STR_Shop_Weapon_BoughtItem",_itemInfo select 1,[_price] call life_fnc_numberText];
__SUB__(life_cash,_price);
[_item,true] spawn life_fnc_handleItem;
};
} else {
if(_price > life_cash) exitWith {hint localize "STR_NOTF_NotEnoughMoney"};
hint parseText format[localize "STR_Shop_Weapon_BoughtItem",_itemInfo select 1,[_price] call life_fnc_numberText];
life_cash = life_cash - _price;
[_item,true] spawn life_fnc_handleItem;
};
};
[] call life_fnc_saveGear;
Alles anzeigen
Ich hoffe mir kann jemand helfen.
Mit freundlichen Grüßen!