this enableDamage false; vor dem Spawn. Und wenn er gespawnnt ist this enableDamage true;
Und wie muss ich das umsetzen?
this enableDamage false; vor dem Spawn. Und wenn er gespawnnt ist this enableDamage true;
Und wie muss ich das umsetzen?
Hey wenn wir spawnen bekommt man schaden. Weiß jemand woran es liegen kann
Hey, wir haben Das Problem das sich nach Undefinierter Zeit die Frequenzen von den Funkgeräten bei den Spielern verstellen. Woran kann das liegen und wie kann man das Beheben?
Mods sind alle Richtig Hochgeladen, beim Medicshop sind ja ebenfalls Fahrzeuge aus dem Modpack Drin und diese Funktioneren.
Das ist der Aufruf
this enableSimulation false; this allowDamage false; this addAction[localize""STR_MAR_W_E_Vehicle Shop"",life_fnc_vehicleShopMenu,[""copcar_shop"",west,""cop_car_3"",""cop"",""Police Department""]]; this addAction[localize""STR_MAR_W_Car_Garage"", { if (life_HC_isActive) then { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""HC_fnc_getVehicles"",HC_Life]; } else { [getPlayerUID player,playerSide,""Car"",player] remoteExecCall [""TON_fnc_getVehicles"",2];}; createDialog ""Life_impound_menu""; disableSerialization; ctrlSetText[2802,""Fetching Vehicles....""]; life_garage_sp = ""cop_car_3""; life_garage_type = ""Car""; },"""",0,false,false,"""",'playerSide isEqualTo west']; this addAction[localize""STR_MAR_Store_vehicle_in_Garage"",life_fnc_storeVehicle,"""",0,false,false,"""",'!life_garage_store'];
Sämtliche Fahrzeugshops gehen ja, bis auf den Cop Fahrzeugshop
Hey, wir haben ein Problem mit dem Cop Fahrzeugshop. Es werden keine Fahrzeuge angezeigt. Woran kann es liegen?
Hey, melde dich doch einfach mal Privat bei mir. Dann kann ich dir gern die TS³IP Sowie weitere Informationen zukommen lassen.
Guten Tag,
wir haben bei uns Alle ACE Einstellungen vorgenommen. Dennoch Sterben die User wenn man ihnen Beispielsweise in den Torso schießt und werden nicht bewusstlos.
Wir sind über alle Tipps Dankbar
Ok danke werde ich versuchen
Bei mir kommt diese Fehlermeldung: 21:25:33 Scripting command 'say3d' is not allowed to be remotely executed
Habe es auch bereits so in der CfgRemoteExec eingefügt : F(say3d,ANYONE)
jedoch leider ohne Erfolg, dieser Fehler kommt wenn in einem Mod ein Sound abgespielt werden soll.
Woran könnte es liegen bzw. wie kann ich es beheben?
Hey, leider finde ich zu dem Thema nix im Forum, wie ist es möglich Funktionen wie z.b. Ausweis zeigen auf ACE zu legen
Nein er blockiert nix
Hey, wir haben folgendes Problem. Wenn wir mit unseren Modpack in den Editor gehen kommt die Fehlermeldung: ace_advanced_ballistics_x64.dll not found.
Wir verwenden die aktuelle ACE Version
(Download stand vom 17.02.19)
Vielen Dank jetzt geht es
Jetzt kommt leider das Feld garnicht mehr
Guten Tag, ich hätte es gern so das wenn jemand durch ACE Bewusstlos wird den Notruf betätigen kann.
Aktuell Funktioniert es auch nur die Personen können den Notruf Spammen, wie kann ich das Beheben?
Hier ist die Entsprechende Datei:
#include "..\script_macros.hpp"
/*
File: fn_survival.sqf
Author: Bryan "Tonic" Boardwine
Description:
All survival? things merged into one thread.
*/
private ["_fnc_food","_fnc_water","_foodTime","_waterTime","_bp","_walkDis","_lastPos","_curPos"];
_fnc_food = {
if (life_hunger < 2) then {player setDamage 1; hint localize "STR_NOTF_EatMSG_Death";}
else
{
life_hunger = life_hunger - 10;
[] call life_fnc_hudUpdate;
if (life_hunger < 2) then {player setDamage 1; hint localize "STR_NOTF_EatMSG_Death";};
switch (life_hunger) do {
case 30: {hint localize "STR_NOTF_EatMSG_1";};
case 20: {hint localize "STR_NOTF_EatMSG_2";};
case 10: {
hint localize "STR_NOTF_EatMSG_3";
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 1) then {player setFatigue 1;};
};
};
};
};
_fnc_water = {
if (life_thirst < 2) then {player setDamage 1; hint localize "STR_NOTF_DrinkMSG_Death";}
else
{
life_thirst = life_thirst - 10;
[] call life_fnc_hudUpdate;
if (life_thirst < 2) then {player setDamage 1; hint localize "STR_NOTF_DrinkMSG_Death";};
switch (life_thirst) do {
case 30: {hint localize "STR_NOTF_DrinkMSG_1";};
case 20: {
hint localize "STR_NOTF_DrinkMSG_2";
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 1) then {player setFatigue 1;};
};
case 10: {
hint localize "STR_NOTF_DrinkMSG_3";
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 1) then {player setFatigue 1;};
};
};
};
};
//Setup the time-based variables.
_foodTime = time;
_waterTime = time;
_walkDis = 0;
_bp = "";
_lastPos = visiblePosition player;
_lastPos = (_lastPos select 0) + (_lastPos select 1);
_lastState = vehicle player;
for "_i" from 0 to 1 step 0 do {
/* Thirst / Hunger adjustment that is time based */
if ((time - _waterTime) > 600) then {[] call _fnc_water; _waterTime = time;};
if ((time - _foodTime) > 850) then {[] call _fnc_food; _foodTime = time;};
/* Adjustment of carrying capacity based on backpack changes */
if (backpack player isEqualTo "") then {
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
_bp = backpack player;
} else {
if (!(backpack player isEqualTo "") && {!(backpack player isEqualTo _bp)}) then {
_bp = backpack player;
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",_bp,"maximumload") / 4);
};
};
/* Check if the player's state changed? */
if (!(vehicle player isEqualTo _lastState) || {!alive player}) then {
[] call life_fnc_updateViewDistance;
_lastState = vehicle player;
};
/* Check if the weight has changed and the player is carrying to much */
if (life_carryWeight > life_maxWeight && {!isForcedWalk player}) then {
player forceWalk true;
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 1) then {player setFatigue 1;};
hint localize "STR_NOTF_MaxWeight";
} else {
if (isForcedWalk player) then {
player forceWalk false;
};
};
/* Travelling distance to decrease thirst/hunger which is captured every second so the distance is actually greater then 650 */
if (!alive player) then {_walkDis = 0;} else {
_curPos = visiblePosition player;
_curPos = (_curPos select 0) + (_curPos select 1);
if (!(_curPos isEqualTo _lastPos) && {(isNull objectParent player)}) then {
_walkDis = _walkDis + 1;
if (_walkDis isEqualTo 650) then {
_walkDis = 0;
life_thirst = life_thirst - 5;
life_hunger = life_hunger - 5;
[] call life_fnc_hudUpdate;
};
};
_lastPos = visiblePosition player;
_lastPos = (_lastPos select 0) + (_lastPos select 1);
};
if(player getVariable "ACE_isUnconscious") then {
_action = [
format["Du bist Ohnmächtig. Mit letzter kraft kannst du dein Handy ziehen. Möchtest du einen Notarzt über deine Lage informieren? Wenn nicht hast du noch ca 10 Minuten zu leben."],
"Ohnmächtig",
localize "STR_Global_Yes",
localize "STR_Global_No"
] call BIS_fnc_guiMessage;
life_corpse = player;
if(!isNil "_action" && {_action}) then {
[] call life_fnc_requestMedic;
_medicsOnline = {_x != player && {side _x == independent} && {alive _x}} count playableUnits > 0;
if(!_medicsOnline) then {
_action = [
format["Kein Notarzt hat auf deine Nachricht geantwortet."],
"Niemand da",
"Ok"
] call BIS_fnc_guiMessage;
};
};
};
uiSleep 1;
};
Alles anzeigen
Guten Abend,
gibt es eine Möglichkeit außer das PAK um die Bluttextur auf der Kleidung nach der Behandlung weg zu bekommen?
Guten Tag,
leider haben wir zurzeit das Problem das wenn man Beispielsweise 5 Kabelbinder im I Inventar hat und dann die Kleidung wechselt dann 10 Kabelbinder hat.
Ich habe bereits die Dateien Durchgeschaut aber leider nix endeckt.
Hier ist meine HandleItem.sqf und meine WeaponShopBuySell.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_handleItem.sqf
Author: Bryan "Tonic" Boardwine
Description
Main gear handling functionality.
*/
private ["_item","_details","_bool","_ispack","_items","_isgun","_ongun","_override","_toUniform","_toVest","_preview","_acecheck"];
_item = [_this,0,"",[""]] call BIS_fnc_param;
_bool = [_this,1,false,[false]] call BIS_fnc_param;
_ispack = [_this,2,false,[false]] call BIS_fnc_param;
_ongun = [_this,3,false,[false]] call BIS_fnc_param;
_override = [_this,4,false,[false]] call BIS_fnc_param;
_toUniform = [_this,5,false,[false]] call BIS_fnc_param; //Manual override to send items specifically to a uniform.
_toVest = [_this,6,false,[false]] call BIS_fnc_param; //Manual override to send items specifically to a vest
_preview = [_this,7,false,[false]] call BIS_fnc_param;
_acecheck = ["ACE_atropine","ACE_morphine","ACE_epinephrine","ACE_EarPlugs","ACE_fieldDressing","ACE_elasticBandage","ACE_quikclot","ACE_packingBandage","ACE_salineIV_250","ACE_salineIV_500","ACE_tourniquet","ACE_personalAidKit","ACE_bloodIV_250","ACE_bloodIV_500","ACE_plasmaIV_250","ACE_plasmaIV_500","ACE_surgicalKit","ACE_CableTie"];
//Some checks
if (_item isEqualTo "") exitWith {};
_isgun = false;
_details = [_item] call life_fnc_fetchCfgDetails;
if (count _details isEqualTo 0) exitWith {};
if (_bool) then {
switch (_details select 6) do {
case "CfgGlasses": {
if (_toUniform) exitWith {player addItemToUniform _item;};
if (_toVest) exitWith {player addItemToVest _item;};
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (!(goggles player isEqualTo "")) then {
removeGoggles player;
};
player addGoggles _item;
};
};
};
case "CfgVehicles": {
if (!(backpack player isEqualTo "")) then {
_items = (backpackItems player);
removeBackpack player;
};
player addBackpack _item;
clearAllItemsFromBackpack player;
if (!isNil "_items") then {
{[_x,true,true,false,true] call life_fnc_handleItem; } forEach _items;
};
};
case "CfgMagazines": {
if (_toUniform) exitWith {player addItemToUniform _item;};
if (_toVest) exitWith {player addItemToVest _item;};
if (_ispack) exitWith {player addItemToBackpack _item;};
if(_item in _acecheck) then{player addItem _item;};
player addMagazine _item;
};
case "CfgWeapons": {
//New addition
if (_toUniform) exitWith {player addItemToUniform _item;};
if (_toVest) exitWith {player addItemToVest _item;};
if (_ispack) exitWith {player addItemToBackpack _item;};
if(_item in _acecheck) then {player addItem _item;};
if ((_details select 4) in [1,2,4,5,4096]) then {
if ((_details select 4) isEqualTo 4096) then {
if ((_details select 5) isEqualTo -1) then {
_isgun = true;
};
} else {
_isgun = true;
};
};
if (_isgun) then {
if (!_ispack && _override) exitWith {}; //It was in the vest/uniform, try to close to prevent it overriding stuff... (Actual weapon and not an item)
if (_item isEqualTo "MineDetector") then {
player addItem _item;
} else {
player addWeapon _item;
};
} else {
switch (_details select 5) do {
case 0: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (_item in (assignedItems player)) then {
player addItem _item;
} else {
player linkItem _item;
};
};
};
};
case 605: {
if (_ispack) then{
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (headgear player isEqualTo _item && {!_preview}) then {
player addItem _item;
} else {
if (!(headgear player isEqualTo "")) then {removeHeadGear player;};
player addHeadGear _item;
};
};
};
};
case 801: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
if (player isKindOf "Civilian") then {
if (uniform player isEqualTo _item && {!_preview}) then {
player addItem _item;
} else {
if (!(uniform player isEqualTo "")) then {
_items = uniformItems player;
removeUniform player;
};
player addUniform _item;
if (!isNil "_items") then {
{player addItemToUniform _x} forEach _items;
};
};
} else {
if (!(uniform player isEqualTo "")) then {
_items = uniformItems player;
removeUniform player;
};
if (!(player isUniformAllowed _item)) then {
player forceAddUniform _item;
} else {
player addUniform _item;
};
if (!isNil "_items") then {
{player addItemToUniform _x} forEach _items;
};
};
};
};
};
case 701: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then{
player addItem _item;
} else {
if (vest player isEqualTo _item && {!_preview}) then {
player addItem _item;
} else {
if (!(vest player isEqualTo "")) then {
_items = vestItems player;
removeVest player;
};
player addVest _item;
if (!isNil "_items") then {
{[_x,true,false,false,true] spawn life_fnc_handleItem;} forEach _items;
};
};
};
};
};
case 201: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
private "_type";
_type = [_item,201] call life_fnc_accType;
if (_ongun) then {
switch (_type) do {
case 1: { player addPrimaryWeaponItem _item; };
case 2: { player addSecondaryWeaponItem _item; };
case 3: { player addHandgunItem _item; };
};
} else {
if (_override) then {
player addItem _item;
} else {
private ["_wepItems","_action","_slotTaken"];
_wepItems = switch (_type) do {case 1:{primaryWeaponItems player}; case 2:{secondaryWeaponItems player}; case 3:{handgunItems player}; default {["","",""]};};
_slotTaken = false;
if (!((_wepItems select 2) isEqualTo "")) then {_slotTaken = true;};
if (_slotTaken) then {
_action = [localize "STR_MISC_AttachmentMSG",localize "STR_MISC_Attachment",localize "STR_MISC_Weapon",localize "STR_MISC_Inventory"] call BIS_fnc_guiMessage;
if (_action) then {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
} else {
player addItem _item; //Add it to any available container
};
} else {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
};
};
};
};
};
case 301: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
private "_type";
_type = [_item,301] call life_fnc_accType;
if (_ongun) then {
switch (_type) do {
case 1: { player addPrimaryWeaponItem _item; };
case 2: { player addSecondaryWeaponItem _item; };
case 3: { player addHandgunItem _item; };
};
} else {
if (_override) then {
player addItem _item;
} else {
private ["_wepItems","_action","_slotTaken"];
_wepItems = switch (_type) do {case 1:{primaryWeaponItems player}; case 2:{secondaryWeaponItems player}; case 3:{handgunItems player}; default {["","",""]};};
_slotTaken = false;
if (!((_wepItems select 1) isEqualTo "")) then {_slotTaken = true;};
if (_slotTaken) then {
_action = [localize "STR_MISC_AttachmentMSG",localize "STR_MISC_Attachment",localize "STR_MISC_Weapon",localize "STR_MISC_Inventory"] call BIS_fnc_guiMessage;
if (_action) then {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
} else {
player addItem _item; //Add it to any available container
};
} else {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
};
};
};
};
};
case 101:{
if (_ispack) then {
player addItemToBackpack _item;
} else {
private "_type";
_type = [_item,101] call life_fnc_accType;
if (_ongun) then {
switch (_type) do {
case 1: { player addPrimaryWeaponItem _item; };
case 2: { player addSecondaryWeaponItem _item; };
case 3: { player addHandgunItem _item; };
};
} else {
if (_override) then {
player addItem _item;
} else {
private ["_wepItems","_action","_slotTaken"];
_wepItems = switch (_type) do {case 1:{primaryWeaponItems player}; case 2:{secondaryWeaponItems player}; case 3:{handgunItems player}; default {["","",""]};};
_slotTaken = false;
if (!((_wepItems select 0) isEqualTo "")) then {_slotTaken = true;};
if (_slotTaken) then {
_action = [localize "STR_MISC_AttachmentMSG",localize "STR_MISC_Attachment",localize "STR_MISC_Weapon",localize "STR_MISC_Inventory"] call BIS_fnc_guiMessage;
if (_action) then {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
} else {
player addItem _item; //Add it to any available container
};
} else {
switch (_type) do {
case 1: {player addPrimaryWeaponItem _item;};
case 2: {player addSecondaryWeaponItem _item;};
case 3: {player addHandgunItem _item;};
default {player addItem _item;};
};
};
};
};
};
};
case 621: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
player linkItem _item;
};
};
};
case 616: {
if (_ispack) then {
player addItemToBackpack _item;
} else {
if (_override) then {
player addItem _item;
} else {
player linkItem _item;
};
};
};
default {
if (_ispack) then {
player addItemToBackpack _item;
} else {
player addItem _item;
};
};
};
};
};
};
} else {
switch (_details select 6) do {
case "CfgVehicles": {
removeBackpack player;
};
case "CfgMagazines": {
player removeMagazine _item;
};
case "CfgGlasses": {
if (_item isEqualTo goggles player) then {
removeGoggles player;
} else {
player removeItem _item;
};
};
case "CfgWeapons": {
if ((_details select 4) in [1,2,4,5,4096]) then {
if ((_details select 4) isEqualTo 4096) then {
if ((_details select 5) isEqualTo 1) then {
_isgun = true;
};
} else {
_isgun = true;
};
};
if (_isgun) then {
switch (true) do {
case (primaryWeapon player isEqualTo _item) : {_ispack = false;};
case (secondaryWeapon player isEqualTo _item) : {_ispack = false;};
case (handgunWeapon player isEqualTo _item) : {_ispack = false;};
case (_item in assignedItems player) : {_ispack = false;};
default {_ispack = true;};
};
if (_item isEqualTo "MineDetector") then {
player removeItem _item;
} else {
//Lovely code provided by [OCB]Dash
private "_tmpfunction";
_tmpfunction = {
private ["_tWeapons","_tWeaponCount"];
switch (true) do {
case (_this in (uniformItems player)): {
_tWeapons = (getWeaponCargo (uniformContainer player)) select 0;
_tWeaponCount = (getWeaponCargo (uniformContainer player)) select 1;
clearWeaponCargo (uniformContainer player);
{
_numVestWeps = _tWeaponCount select _forEachIndex;
if (_x == _this) then
{
_numVestWeps = _numVestWeps - 1;
};
(uniformContainer player) addWeaponCargo [ _x,_numVestWeps];
}forEach _tWeapons;
};
case (_this in (vestItems player)): {
_tWeapons = (getWeaponCargo (vestContainer player)) select 0;
_tWeaponCount = (getWeaponCargo (vestContainer player)) select 1;
clearWeaponCargo (vestContainer player);
{
_numVestWeps = _tWeaponCount select _forEachIndex;
if (_x == _this) then
{
_numVestWeps = _numVestWeps - 1;
};
(vestContainer player) addWeaponCargo [ _x,_numVestWeps];
}forEach _tWeapons;
};
case (_this in (backpackItems player)): {
_tWeapons = (getWeaponCargo (backpackContainer player)) select 0;
_tWeaponCount = (getWeaponCargo (backpackContainer player)) select 1;
clearWeaponCargo (backpackContainer player);
{
_numVestWeps = _tWeaponCount select _forEachIndex;
if (_x == _this) then
{
_numVestWeps = _numVestWeps - 1;
};
(backpackContainer player) addWeaponCargo [ _x,_numVestWeps];
}forEach _tWeapons;
};
};
};
if (_ispack) then {
_item call _tmpfunction;
} else {
switch (true) do {
case (_item in (uniformItems player)): {_item call _tmpfunction;};
case (_item in (vestItems player)) : {_item call _tmpfunction;};
case (_item in (backpackItems player)) : {_item call _tmpfunction;};
default {player removeWeapon _item;};
};
};
};
} else {
switch (_details select 5) do {
case 0: {player unassignItem _item; player removeItem _item;};
case 605: {if (headgear player isEqualTo _item) then {removeHeadgear player} else {player removeItem _item};};
case 801: {if (uniform player isEqualTo _item) then {removeUniform player} else {player removeItem _item};};
case 701: {if (vest player isEqualTo _item) then {removeVest player} else {player removeItem _item};};
case 621: {player unassignItem _item; player removeItem _item;};
case 616: {player unassignItem _item; player removeItem _item;};
default {
switch (true) do {
case (_item in primaryWeaponItems player) : {player removePrimaryWeaponItem _item;};
case (_item in handgunItems player) : {player removeHandgunItem _item;};
default {player removeItem _item;};
};
};
};
};
};
};
};
Alles anzeigen
#include "..\..\script_macros.hpp"
/*
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) isEqualTo -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]) isEqualTo 1) then {
CASH = 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 _altisArray = ["Land_u_Barracks_V2_F","Land_i_Barracks_V2_F"];
private _tanoaArray = ["Land_School_01_F","Land_Warehouse_03_F","Land_House_Small_02_F"];
private _hideoutObjs = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;
private _hideout = (nearestObjects[getPosATL player,_hideoutObjs,25]) select 0;
if (!isNil "_hideout" && {!isNil {group player getVariable "gang_bank"}} && {(group player 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>",
[(group player getVariable "gang_bank")] call life_fnc_numberText,
[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 = group player getVariable "gang_bank";
_funds = _funds - _price;
group player setVariable ["gang_bank",_funds,true];
[_item,true] spawn life_fnc_handleItem;
if (life_HC_isActive) then {
[1,group player] remoteExecCall ["HC_fnc_updateGang",HC_Life];
} else {
[1,group player] remoteExecCall ["TON_fnc_updateGang",RSERV];
};
} else {
if (_price > CASH) exitWith {hint localize "STR_NOTF_NotEnoughMoney"};
hint parseText format [localize "STR_Shop_Weapon_BoughtItem",_itemInfo select 1,[_price] call life_fnc_numberText];
CASH = CASH - _price;
[_item,true] spawn life_fnc_handleItem;
};
} else {
if (_price > CASH) exitWith {hint localize "STR_NOTF_NotEnoughMoney"};
hint parseText format [localize "STR_Shop_Weapon_BoughtItem",_itemInfo select 1,[_price] call life_fnc_numberText];
CASH = CASH - _price;
[_item,true] spawn life_fnc_handleItem;
};
};
[0] call SOCK_fnc_updatePartial;
[] call life_fnc_saveGear;
Alles anzeigen