Jump to content

fight9

Member
  • Content Count

    382
  • Joined

  • Last visited

  • Medals

Everything posted by fight9

  1. Its the use of BIS_fnc_MP here that causes the script to run for all players.
  2. BIS_fnc_objectVar can also give an object a global variable name from a string. https://community.bistudio.com/wiki/BIS_fnc_objectVar
  3. fight9

    Error in expression!

    you were missing some closing brackets. I tried to clean it up a bit. I think this is what you want. _unitsArray = _this select 0; for "_c" from 0 to (count _unitsArray -1) do { _obj = _unitsArray select _c; _isGroup = false; if (_obj in allGroups) then {_isGroup = true;}; if (_isGroup) then { if (!isNull _x) then { {deleteVehicle _x;} forEach (units _obj); }; } else { if (!isNull _obj) then { deleteVehicle _obj; }; }; };
  4. fight9

    FIA Site Modules

    That's got to be a bug. The Independent faction is designed to corporate - or challenge - each faction. The Site module is probably using the East side units by default with no option to change it.
  5. Today's Dev branch update adds config export for the Virtual Arsenal (Ctrl-Shift-C).
  6. This page has all the information https://community.bistudio.com/wiki/Arsenal
  7. There are multiple ways to do it. SilentSpike explained it correctly. Follow his post. Define the tag and the file location and make sure the files start with "fn_".
  8. Post your cfgFunctions.hpp and your folder/file naming and structure. You're previous examples where missing the "file" and "tag" entries.
  9. I find the functions makes setting default values for optional arguments easier. _param0 = if (count _this > 0) then {_this select 0} else {false}; // is the same as _param0 = [_this,0,false] call BIS_fnc_param;
  10. Call compile can turn string to code without the brackets. call compile format ["_obj = %1",_varname]; is the same as _obj = _varname;
  11. Are you using a game logic? That gets spawned for each person. Use an invisible helipad instead.
  12. I'm glad you worked it out. Truth be told, I'm glad you figured it out without me having write the exact code. It means you are learning. Good shit
  13. You could use a trigger with the radio menu commands.
  14. Use the format command to put _ai into the trigger statement string. You can't write local variables like that - It's in a different scope.
  15. You are creating the local variable in a different scope. Try adding private "_scase"; to the top of the script.
  16. It didn't work reliably as a mod. It would cause the game to freeze up. Perhaps if I get some time in the future, I can rewrite it and apply it the proper way.
  17. fight9

    Ammo Box Config Backpack

    I think you need to use the transportBackpack class instead of items.
  18. You can't run the PP module functions locally? Find the function that the module runs and try to run it locally instead of globally.
  19. The MP event handlers execute on all machines. It's best used for running scripts on the server. You should switch it out for the regular event handlers that run locally. Since the gear commands need to be run locally anyway, that would work best, I think. Test that and see if it runs more reliably. If the problem is actually in returning and applying the correct gear, then there is way to save the gear prior to death. It might take some thinking but its definitely possible. There are "take" and "put" eventhandlers that pertain to inventory that could easily log the gear that a player has into [a] variable(s). Then when the respawn event handler runs, it could apply all of that gear. This is just one method that I can think of off the top of my head. I'm sure there is a much better way. You might want to consult some other scripts and mods like MCC that have gear saving. That might give you a better idea of what needs to be done.
  20. Some of the backpack classes/base classes where changed with the Kart DLC update. The TFAR creator has already pushed an update fixing the backpack issues. I would recommend consulting that thread (or even PMing the creator) and asking what needs to be done - assuming these messed up backpacks are of your creation - or you just have to wait and hope that the creator updates his mod soon.
  21. I've been using the logic base class in a editor module adding mod I am working on. From my testing, the logic exists and initiates on both the server and the client. I could be wrong, though - I often am. One way to prove this is to place a game logic in the editor with a createVehicle (any vehicle) in its initalization box and you will see it spawn for every client (plus server) that connects. It took some failed missions for me to figure that one out.
  22. Have you tried sending your _code as code {} and not as a string ""? Line 41 is formatting a string into a function name. If you are trying to send script, and not a function, use the brackets instead.
  23. I think we are going about this the wrong way. Perhaps you are trying to apply this to both AI and players, but if it's just players, try this: without the forEach loop switch (side player) do { case WEST: {player addEventHandler ["Killed", {[100] execVM "BLUaddMoney.sqf";}];}; case EAST: {player addEventHandler ["Killed", {[100] execVM "OPPaddMoney.sqf";}];}; default {}: };
  24. playerSide is kind of a strange command. It can return WEST by default for any JIP player early during initialization. It differs from the side command because it will works on dead units. You don't really need that though. Try this instead: { switch (side _x) do { case WEST: {_x addEventHandler ["Killed", {[100] execVM "BLUaddMoney.sqf";}];}; case EAST: {_x addEventHandler ["Killed", {[100] execVM "OPPaddMoney.sqf";}];}; default {}: }; } foreach allUnits;
×