Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 05/01/2023 in all areas

  1. Thanks you two for bothering to help, i redid the server like i said, and now it works. ^^
    2 points
  2. Since it works for you its evident that i created the issue myself while configuring the file in the Eden Editor. I will try to set up the mission again, but this time not editing to much in order to have a cleaner save
    1 point
  3. Hello friends. I buy weapon attachments, but the weapon doesn't come on it, it goes in the bag. For this, after purchasing weapon attachments, I want them to be added to the weapon. How can I edit this?
    1 point
  4. @GraveYard Thanks for bringing this to my attention My bad I was rushing the code and was also working on another project, it is now fixed I will also recheck my work throughout Viscode and Debug through ArmDebugger Code appears to be working correctly, I have removed the accidental Prams that I use for another framework! REMOVED: addLauncherItem
    1 point
  5. @KllTA in case 3 addLauncherItem is not part of Arma 3
    1 point
  6. These changes should help improve the code's structure and readability, as well as address some potential issues. However, please note that I can't guarantee that the code will work as intended without additional context or a specific problem to solve. Make sure to thoroughly test the code and adjust it as needed to meet your requirements. #include "..\..\script_macros.hpp" /* File: fn_handleItem.sqf Author: Bryan "tonic" Boardwine Description Main gear handling functionality. */ private["_items", "_isgun"]; params[ ["_item", "", [""]], ["_bool", false, [false]], ["_ispack", false, [false]], ["_ongun", false, [false]], ["_override", false, [false]], ["_touniform", false, [false]], ["_tovest", false, [false]], ["_preview", false, [false]] ]; // Some checks if (_item == "") exitwith {}; private _details = [_item] call life_fnc_fetchCfgDetails; if (count _details == 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 == "")) then { removeGoggles player; }; player addgoggles _item; }; }; }; case "Cfgvehicles": { if (!(backpack player == "")) 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; }; player addMagazine _item; }; case "Cfgweapons": { if (_touniform) exitwith { player addItemtouniform _item; }; if (_tovest) exitwith { player addItemtovest _item; }; if (_ispack) exitwith { player addItemtobackpack _item; }; if ((_details select 4) in [1, 2, 4, 5, 4096]) then { if ((_details select 4) == 4096) then { if ((_details select 5) == - 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 == "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 { player addprimaryWeaponItem _item; }; }; }; case 1: { if (_ispack) then { player addItemtobackpack _item; } else { if (_override) then { player addItem _item; } else { player addHandgunItem _item; }; }; }; case 2: { if (_ispack) then { player addItemtobackpack _item; } else { if (_override) then { player addItem _item; } else { player addsecondaryWeaponItem _item; }; }; }; case 3: { if (_ispack) then { player addItemtobackpack _item; } else { if (_override) then { player addItem _item; }; }; }; default { systemChat format["Unhandled item type: %1", _item]; diag_log format["Unhandled item type: %1", _item]; }; }; }; }; }; }; // Handle gear preview if (_preview) then { player call life_fnc_handleItemPreview; };
    1 point
  7. Hello, I'm making a life server on the latest 5.0 version of Altis Life Framework, its up and running smooth. I would like to make gathering toggled/automatic so players don't have to keep hitting the Windows Key to keep gathering ingredients on the map. Basic Description of desired result: User hits Windows Key to start gathering ingredients and the character will do so until full or until user hits the TAB key to stop gathering ingredients. "Olympus Entertainment" has this functionality on their life server so, I know its possible, I just don't know how. What I have done so far is inserted a "while true" statement in the "fn_gather.sqf" file to loop the gathering script which works so far. Now I just need help making the "TAB" key stop/interrupt/cancel/suspend/terminate/pause/exit the "fn_gather.sqf" script. I would also like to adapt this to processing as well to cancel processing by hitting TAB. Any and all help is much appreciated, thanks for reading and have a great day. #include "..\..\script_macros.hpp" /* File: fn_gather.sqf Author: Devilfloh Description: Main functionality for gathering. */ autogather = 1; while {autogather > 0} do { private ["_maxGather","_resource","_amount","_maxGather","_requiredItem"]; if (life_action_inUse) exitWith {}; if !(isNull objectParent player) exitWith {}; if (player getVariable "restrained") exitWith {hint localize "STR_NOTF_isrestrained";}; if (player getVariable "playerSurrender") exitWith {hint localize "STR_NOTF_surrender";}; life_action_inUse = true; _zone = ""; _requiredItem = ""; _exit = false; _resourceCfg = missionConfigFile >> "CfgGather" >> "Resources"; for "_i" from 0 to count(_resourceCfg)-1 do { _curConfig = _resourceCfg select _i; _resource = configName _curConfig; _maxGather = getNumber(_curConfig >> "amount"); _zoneSize = getNumber(_curConfig >> "zoneSize"); _resourceZones = getArray(_curConfig >> "zones"); _requiredItem = getText(_curConfig >> "item"); { if ((player distance (getMarkerPos _x)) < _zoneSize) exitWith {_zone = _x;}; } forEach _resourceZones; if (_zone != "") exitWith {}; }; if (_zone isEqualTo "") exitWith {life_action_inUse = false;}; if (_requiredItem != "") then { _valItem = missionNamespace getVariable "life_inv_" + _requiredItem; if (_valItem < 1) exitWith { switch (_requiredItem) do { //Messages here }; life_action_inUse = false; _exit = true; }; }; if (_exit) exitWith {life_action_inUse = false;}; _amount = round(random(_maxGather)) + 1; _diff = [_resource,_amount,life_carryWeight,life_maxWeight] call life_fnc_calWeightDiff; if (_diff isEqualTo 0) exitWith { hint localize "STR_NOTF_InvFull"; life_action_inUse = false; }; switch (_requiredItem) do { case "pickaxe": {[player,"mining",35,1] remoteExecCall ["life_fnc_say3D",RCLIENT]}; default {[player,"harvest",35,1] remoteExecCall ["life_fnc_say3D",RCLIENT]}; }; for "_i" from 0 to 4 do { player playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; waitUntil{animationState player != "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";}; sleep 0.5; }; if ([true,_resource,_diff] call life_fnc_handleInv) then { _itemName = M_CONFIG(getText,"VirtualItems",_resource,"displayName"); titleText[format [localize "STR_NOTF_Gather_Success",(localize _itemName),_diff],"PLAIN"]; }; sleep 1; life_action_inUse = false; //switch (_code) do { //case 15: { //exitWith { //hint localize "Action Cancelled"; //life_action_inUse = false;} //}; //}; };
    1 point
  8. Thanks for the code, I got it working on our end, notice and all.
    1 point
  9. Problem is most servers have anal staff. Most server's re-use the same old public stuff, instead of making their own unique stuff. Problem is, Altis Life framework is oversatured. Making a server is easy, modifying code is easy. Maintaining a server, cost's etc. Is not. You need a player base that actually want to play on a server. Lastly, the grind on servers is time consuming, only for it to shut down. Or you have servers like Anzus Gaming, who like to fondle children to make them stay, or DOS people. Either one.
    1 point
  10. The file that dose this is fn_handleItem.sqf. Are you running a modded server?
    1 point
  11. /* Paycheck & Bank System Configurations */ bank_cop = 9500; //Amount of cash in bank for new cops bank_civ = 3500; //Amount of cash in bank for new civillians bank_med = 7500; //Amount of cash in bank for new medics
    1 point
  12. Altis_life.Altis\configs\Config_Master.hpp
    1 point
  13. These are from a person called KillerRabbit, I remember him on a server I use to be a cop on. The site is down but id say he would still request credit give etc.
    1 point
  14. Как закрыть доступ гражданськым заходить за полицию и медиков помогите пожалуйста
    0 points
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.