Jump to content

Mr H.

Member
  • Content Count

    597
  • Joined

  • Last visited

  • Medals

Everything posted by Mr H.

  1. Mr H.

    Custom player loadout

    this is a reserved variable! this = player; makes no sense, replace it with player. Also if you leave the last line all your players will have the same identity
  2. it should be in initplayerlocal.sqf if it works in init but not in initplayerlocal you did something wrong in there. Also this post is in the wrong section, ask a moderator to move it here : https://forums.bohemia.net/forums/forum/154-arma-3-mission-editing-scripting/
  3. Or a hidden selection then in the p3d? Would be useful to have a look at its config.
  4. Probably more an animation than another p3d don't you think?
  5. Player is not a valid variable on the server. Either run it client side or get the player object.
  6. I'm not at home so I can't run tests on your issue @neman.ekd btw with the satellite mod you can also access the satellite by deploying an antenna and connecting it to the U.T.D. tablet. Both can be found in the inventory items.
  7. Depends on what you aim for. Security wise it's better to have them declared in the cfgFunctions. I also find that separate files for each function is clearer and easier to maintain
  8. Your file has to be named fn_test.sqf and placed in the directory named functions
  9. class CfgFunctions { class Robust { class Mission { file = "functions"; class Aihandler{}; class test; }; }; }; [Some params] spawn Test
  10. But why to you do that since you have a cfg functions? Why not just declare them along the others?
  11. Check that your curator module is indeed named gamemaster. Also I used the wrong eventhandler it should be playerConnected
  12. Never. Declare it in cfg functions and then spawn it.
  13. Uav screen you can,strategic map you can't
  14. addMissionEventHandler ["PlayerDisconnected", { params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"]; GameMaster addCuratorEditableObjects [playableUnits,true ]; }]; In your serverinit Btw playableUnits is already an array so I removed the []
  15. For this initserver is better but you'd be better off doing it with an event handler
  16. But why ? BIS_fnc_spawnVehicle returns the vehicle, can spawn it in the air and flying and gives you more control! will work but it's way messier and more complicated to set up, plus it might detct the wrong aircraft if one is passing you by closer
  17. nope @Dedmen used pseudo code to show you how it works but not actual code, no mistake on your end.
  18. but that's not what Bis_fnc_flyby is for, you should use BIS_fnc_spawnVehicle instead
  19. in your initplayerLocal.sqf private _uids = ["UID1","UID2"]; //list allowed player uids here eg. ["01234567"] OR ["0123456","0147896"] if ((getPlayerUID player) in _uids) then { //your code here };
  20. will only work if you are hosting then on dedicated server "player" makes no sense
  21. ah ah yeah I don't use findIf often enough! 😊
  22. Don't say that! Your script was good in the first place, when you post here people will offer alternatives and more optimized versions, I'm sure someone here can do better than my solution as well! That's how you learn. This was in no way meant as criticism!
  23. Answering my own question: you did that because you have one texture for oefcp one for ucp but you don't need that, when texture with color alpha (transparent background) works fine, just tested it, and saves you the trouble of having to prepare two textures for players. Aso I've modified the script again. The uniform with nametag space has a selection called "identity", the following will work with all uniforms having a selection "identity" if rhs keeps this structure it will be compatible with all the uniforms that support it. This has been tested and works: //in initplayerLocal.sqf TAG_fnc_playerData ={ params ["_player"]; private _UIDsTexts = [ ["SOMEPLAYERUID","PATHTOCORRESPONDINGTEXT"], ["SOMEOTHERPLAYERUID","SOMEOTHERPATHTOTEXT"] //etc ]; private _return = []; { if (getPlayerUID _player == (_x select 0)) then {_return =_x}; }forEach _UIDsTexts; _return }; TAG_fnc_setNameTag = { params ["_player"]; private _data = [_player] call TAG_fnc_playerData; if (_data isEqualTo []) exitWith {diag_log format ["Player %1 not listed",name _player],false}; if ("identity" in (selectionNames _player)) then { _player setObjectTextureGlobal [3,(_data select 1)]; }; true }; //------ [player] call TAG_fnc_setNameTag; ["ace_arsenal_displayClosed", { [player] call TAG_fnc_setNameTag; }] call CBA_fnc_addEventHandler;
  24. Why do you set the texture twice every time? also this can be simplified: //in initplayerLocal.sqf TAG_fnc_playerData ={ params ["_player"]; private _UIDsTexts = [ ["SOMEPLAYERUID","PATHTOCORRESPONDINGTEXT"], ["SOMEOTHERPLAYERUID","SOMEOTHERPATHTOTEXT"] //etc ]; private _return = []; { if (getPlayerUID _player == (_x select 0)) then {_return =_x}; }forEach _UIDsTexts; _return }; TAG_fnc_setNameTag = { params ["_player"]; private _data = [_player] call TAG_fnc_playerData; if (_data isEqualTo []) exitWith {diag_log format ["Player %1 not listed",name _player],false}; if ((uniform _player) in ["rhs_uniform_acu_ucp","rhs_uniform_acu_oefcp"]) then { _player setObjectTextureGlobal [3,(_data select 1)]; }; true }; //------ [player] call TAG_fnc_setNameTag; ["ace_arsenal_displayClosed", { [player] call TAG_fnc_setNameTag; }] call CBA_fnc_addEventHandler;
×