Jump to content

Chris_37

Member
  • Content Count

    31
  • Joined

  • Last visited

  • Medals

Posts posted by Chris_37


  1. Hello wondering if anyone could help me,

     

    ive currently done this 

     _group_name = _myGroup select 0;
    _group_leaders = _myGroup select 1;
    _group_members = _myGroup select 2;
    _group_funds = _myGroup  select 3;
    _group_wars = _myGroup select 4;

     

    _uid = getPlayerUID player;
    serverGroups deleteAt (_group_members find _uid);

    publicVariable "serverGroups";
     

    however this seems to delete everything within serverGroups


  2. On 23/04/2018 at 7:57 PM, HazJ said:

    From top of my head, not tested. Something like:

    initServer.sqf

    
    [] execVM "\server\whitelistedUIDs.sqf";

    whitelistedUIDs.sqf

    
    whitelistedUIDs = ["123", "321"];
    publicVariable "whitelistedUIDs";

    \server

    \server\whitelistedUIDs.sqf

    Where "server" is a folder in the root directory where server files are. Feel free to change the name. Just a note: It isn't ideal to use PV with a lot of things, as it will broadcast to everyone over the network (even players already on server) which could cause a lot of desync, etc... For that, use publicVariableClient command. For this (example above) it should be okay. I just meant for a lot of server-side code.

    Thanks, is it possible for the file to be edited while the server is active or would i have to use something like extdb3?


  3. Hello, wondering if someone could tell me what i am doing wrong?

     

    i currently have this in my config.cpp

     

    class CfgWorlds
    {
        class Zargabad
        {
            cutscenes[] = {"IntroZc"}; // Class names of used scenes. When more than one is present, the system will pick one randomly.
        };
    };

    class CfgMissions
    {
        class Cutscenes
        {
            class IntroZc // Class referenced in 'cutscenes' property in CfgWorlds
            {
                directory = "\ZC\data\ZCIntro.Zargabad"; // Path to scenario with the scene
            };
        };
    };

     

    however it doesn't seem to work. i have followed the guide here https://community.bistudio.com/wiki/Arma_3_Main_Menu

     


  4. 26 minutes ago, lordfrith said:

    my bad, i'd not noticed something in the wiki  :

     

     

    so _target is fine! sorry mate :D its a lot to absorb in one go...

     

    anyways heres the latest test that seems to work as intended. note it only worked when i set "organs" to true...

     

      Hide contents

    this setVariable ["Organs", true];       //using 'this' as testing on placed civ unit

    this addEventHandler ["Killed",  
      {
        params ["_unit", "_killer", "_instigator"];
        [
        _unit,                                                                                                                              
        "Harvest Organs",                                                                                                                      
        "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",                   
        "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",               
        "_target getVariable ['Organs',false]",                                                         //organs is already in quotes so use single '
        "_target  distance _caller  < 3",                                                      
        {},                                                                                  
        {},                                                                                  
        {hint "test";},                                               
        {},                                                                         
        [],                                                                     
        12,                                                                          
     
        0,                                                                                
        true,                                                                            
        false                                                                                
    ] remoteExec ["BIS_fnc_holdActionAdd",[0,2] select isDedicated, _unit];}  ];

     

    thanks for the help 

    any idea how i could remove that action after a certain amount of time?


  5. 45 minutes ago, lordfrith said:

     

    how were you trying to use it and what variable? it should be possible i think as long as the syntax is right...

     

    could you maybe post an example of what you're trying to do

    player addEventHandler ["Killed",
    {
        params ["_unit", "_killer"];
        [
        _unit,                                                                                                                              // Object the action is attached to
        "Harvest Organs",                                                                                                                        // Title of the action
        "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",                     // Idle icon shown on screen
        "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",                // Progress icon shown on screen
        "_target getVariable ["Organs",false];",                                                        // Condition for the action to be shown
        "_caller distance _target < 3",                                                      // Condition for the action to progress
        {},                                                                                  // Code executed when action starts
        {},                                                                                  // Code executed on every progress tick
        {hint "test";},                                                // Code executed on completion
        {},                                                                                  // Code executed on interrupted
        [],                                                                                  // Arguments passed to the scripts as _this select 3
        12,                                                                                  // Action duration

        0,                                                                                   // Priority
        true,                                                                                // Remove on completion
        false                                                                                // Show in unconscious state 
    ] remoteExec ["BIS_fnc_holdActionAdd", [0,2] select isDedicated, _unit]; 

     

    not sure if i should be using _target or not?

    i also get this error

    12:18:03 Error in expression                 
    "_target getVariable ["Organs",false];",                       
    12:18:03   Error position: <Organs",false];",                       
    12:18:03   Error Missing ]


  6. T

    13 hours ago, HazJ said:

    Another way is addEventHandler command.

    https://community.bistudio.com/wiki/Arma_3:_Event_Handlers

    
    player addEventHandler ["Killed",
    {
    	params ["_unit", "_killer"];
    	// add BIS_fnc_holdActionAdd to _unit
    }];

     

     

    14 hours ago, lordfrith said:

    you could use the "onPlayerKilled.sqf" event script          and it would add it to player unit when the player dies?

     

    Thanks guys really helped however can you not use getVariable in the Condition for the action to be shown?


  7. Hello wondering if anyone is able to help me currently i am attempting to create it so when a unit enters the INCAPACITATED state a dialog appears on the screen not sure if i am going about it right however i currently have 

     

    if (lifeState _unit == "INCAPACITATED") then {

    createdialog "blah";

    };

     

    this ^ in my event handler handle damage but cant seem to get it to work any ideas?


  8. 1 hour ago, KC Grimes said:

    You could setVariable forEach  allPlayers, and cycle through getVariable forEach allPlayers each time your variable changes somewhere and do a count for when the variable is equal to whatever. A more efficient approach, depending on what you are accomplishing, could be to keep a script running on the server that manages a global array that adds/removes players from it as a means of "assigning variables". You may have to make it a publicVariable. Again, it just depends on what you are needing the data for. 

    How would i go about doing a gobal array that manages players depending of which variable they had? like in terms of adding/removing?


  9. Hey everyone, 

    I am trying to get all the players in a mission with a certain variable into an array and when their is already 5 players in the array it will stop the player from having a gun.

    So far I have found this and attempted to use it.

    player setVariable ["hasweapon",true, true];

     

       playerArray = [];
     _players = player GetVariable "hasweapon";
      {
       if (!isNil "_players") then
       {
         playerArray PushBack _x;
       };
      } forEach allPlayers;
     hint format ["%1 players have the variable 'hasweapon'.",(count playerArray)];

     

     _result = count playerArray;
     if (_result >= 2) then {
      removeAllWeapons player;
     };

     

    however this didn't completely work I was testing earlier and it wasn't working as expected, am I doing something wrong, or even going about it wrong?


  10. On 1/4/2018 at 2:00 AM, Kulosaqi Ichigo said:

    Hello,

     

    I don't know how to explain this, but when im playing Arma 3 Mulitplayer and tab out, it sometime freeze completly and i can not quit it. My only option is to log out of my Windows 10 Acc or restart my pc. I cannot get onto my desctop nor can i see the Taskmanager (But i can start it) Its really bothering me because i dont want to start every programm again and Arma 3 always takes so long to load...Somebody know how to fix this? I checked the file data via Steam already.

     

    Getting the same issue as well its just started to happen recently. I've even reinstalled my windows and arma in attempt to fix this? Any one got any solutions?

×