Jump to content

Dramacius

Member
  • Content Count

    78
  • Joined

  • Last visited

  • Medals

Everything posted by Dramacius

  1. hey guys, I have found I can allow connections to my server using UID (or more to the point disallow players from joining if they're Steam ID is not in an allowed list. I am sure there is a way of doing other things with it so I have been expermenting with the following idea. I have a nested array of players that includes player name, UID, and a couple of other settings I would like to set when a player joins the server. I use ace so would like to be able to set the Medical, Engineering and EOD perms through this system. players = [ [ "76561198001748042", // Dungeon Master 0, // Medical (0 = none, 1 = Combat Medic, 2 = Doctor) 0, // Engineer (0 = no, 1 = yes) 0 // EOD (0 = no, 1 = yes) ] ]; allowedPlayers = pushBack players (select 0 in each of the sub arrays); // I don't know how to get the position 0 of a sub array and can't find anything on google to explain it. I would like to have these settings set when a player connects so in initPlayerLocal.sqf I need to put the following codes _player = [player name, getplayerUID player]; _name = _player select 0; _uid = _player select 1; _medic = players (each nested array select 1); // I don't know how to do this and the same for engineer and EOD _engineer = players (each nested array select 2); _eod = players (each nested array select 3); if (_uid !in allowedPlayers) then { endMission 3; } else { if (_medic == 1) then { _this setVariable ["ace_medical_medicClass",1,true]; }; if (_medic == 2) then { _this setVariable ["ace_medical_medicClass",2,true]; }; if (_engineer == 1) then { _this setVariable ["ACE_IsEngineer",1,true]; }; if (_EOD == 1) then { _this setVariable ["ACE_isEOD",1,true]; };
  2. New task related to this. I want to extend the controls so that players create or join a specified group when they connect Group names are Spartan, Alpha, Hotel, Apollo, Artemis, Hades and Hydra. I want them to set the Squad Leader to highest ranking member unless someone has joined with the role SquadLead. Is this possible?
  3. hey guys. thanks again for all your help. I have got the majority of this working so far I think however I have added some additional sections. The two problems I am having now is no matter what I set my "Role" as selection 5 of the _allPlayers sub array it always loads the "commander.sqf" script and the second issue is the _this setUnitRank _rank; command is not working it keeps giving me an error saying Type Array expected Object or something similar to that. This is the whole code that runs in initPlayerLocal.sqf I these loadouts stored in seperate SQF files Solved by changing private _index = DM_allPlayers find _uid; to private _index = DM_allPlayers apply {_x #0 } find _uid;
  4. thank you guys, both your codes look great and I will try them tomorrow.
  5. Is it possible to have team members positions around you marked at the edges of the screen akin to how some racing games give indicators to show when other racers are near your vehicle but out of sight? Our group currently uses DUI Radar but would prefer to not have that on display. It shouldn't show the icons for team members that are in view and only show indicators (ideally their role icon) when the team members are "near" (maybe within 10m or configurable maybe) This is beyond my current understandings of sqf and I don't even know if its possible.
  6. Hi all, is there an event handler or way of outputting the number of popup targets that are down? I am running a shooting range that has a timer which stops when all the targets are down, I've been using the EH `hit` to detect if a target has been hit but there are occassions when the target can be hit multiple times before its fully down and it returns false hits in my counter stopping the counter before all targets are down. for reference this is the code for my targets DDR5_RangeTargets = this nearObjects ["TargetP_Inf_F", 40]; targetsHit = 0; { _x setVariable ["nopop", true]; _x addEventHandler ["hit", {targetsHit = targetsHit + 1}]; } forEach DDR5_RangeTargets;
  7. Dramacius

    Shooting Targets

    Thanks I have managed to implement something like this (not on the computer right now to get the exact code I used but it sort of works as long as I am not using full auto as that seems to register multiple hits before it removes the event handler.
  8. This is my full script for a wave based mission that players are able to activate themselves when on the server. I have a few bugs to iron out but currently I have to run the script using []Spawn due to the waitUntil. Can anyone suggest a way around that please?
  9. Please see posts further down for details My understanding clearly wrong, was that using the 3rd optional value in the array would catagorise the list but it doesn't seem to have done that.
  10. Dramacius

    Help with replacing waitUntil

    Thank you loads, I will take a look at this tomorrow and see about getting it implemented and what I can learn to improve my understanding of SQF. I am still baffled by params[] but hopefully I can learn how that works soon.
  11. I might have to put a bunch of small markers or gamelogics down for each section of some of the ranges just to cover the various lines of targets in each lane on the ranges with multiple lanes.
  12. I have a bunch of popup targets scattered around the map (built into the map) and would like to create arrays of the targets for each area so that I can setup a noPop and reset system for the different areas. I can't figure out how to create the array of targets though. They are all of the class "TargetP_Inf_F". could someone help me with this please?
  13. would this work with rectagular markers? At least one of the ranges has multiple positions that if multiple players are using it at the same time would need each "Lane" to have its own reset. I think I am going to have to hide and replace every target manually on the map 😞 there are thousands and doing this is going to inflate the mission file size dramatically especially as the objects are already there!
  14. is there a version of this position nearObjects [typeName, radius] that can detect objects in a marker rather than radius of position?
  15. For reference this is the map https://steamcommunity.com/sharedfiles/filedetails/?id=2983546566&searchtext=
  16. its a new map but very well designed. They work 100% tested, added the noPop and it stops them popping up, removed it and the return to poping up after a second or 2.
  17. I'm using Dagger Island Training Complex (Beta)
  18. I was hoping something like this would work however I don't know what I should put in place of "StaticWeapon" to get an array of the shooting targets vehicles select { _x isKindOf "StaticWeapon" } inAreaArray "myMarker"
  19. Dramacius

    [R3F] Logistics

    I would like to set the creation factory to use a custom list of objects, is this possible?
  20. So, I've created a sandbag wall, attached it to player and figured out how to set it to detach from player. I can't figure out how to manipulate it's vertical or rotational position though which I would like. Ideally I would have liked to be able to attach the object to where the character is looking but can't find how to do that.
  21. I dont know the code to be able to create any of the eden fortification objects attached to a player, allow the player to move around (forced walk) rotate the object horizontally and vertically raise up and down and move further away or bring closer in and then place in final position and orientation. This is basically how the R3F Logistics system works but that does a lot of other things that we don't want and is limited in customisability. I want a dialog that has a list of items on one side an image of the item on the other and a button to "create" the item which will then create the item as described above. I think I need to use the attachTo command ie _object = createVehicle ["Land_BagFence_Round_F",(_this select 1) attachTO [player], [], 0, "CAN_COLLIDE"]; how would I then enable the player to manipulate and place the item? I am thinking the following will be useful to help with manipulating the object whilst its attachedto Player findDisplay 46 displayAddEventHandler ["KeyUp", {}]; another goal would be to be able to pick the item up and reposition it after it had initially been placed I think I am starting to figure out a script idea in my head. its very rough and I don't know if it will work though. _object = createVehicle ["Land_BagFence_Round_F",(_this select 1) attachTO [player], [], 0, "CAN_COLLIDE"]; findDisplay 46 displayAddEventHandler ["KeyUp", {_object setVectorDirAndUp [0,1,0], [0,0,0]}]; // Moves object away by 1m? how do I set a specific key?
  22. An alternative would be if I could call the fortify items from a dialog like R3F Logistics does, only problem with their script is the limitations on customisation.
  23. Dramacius

    Help with replacing waitUntil

    @Larrow Hi, I really apprieciate what you did for me however when I press the dialog button nothing happens on any of them. This is my dialog code
  24. My group wants a vehicle spawner where we can limit what vehicles can be spawned from it very specifically however, I am not sure how to get the configfiles for specific vehicles. my current code is but the hint is only showing me the the config info for the quadbike.
  25. We want to be able to spawn H Barriers and things like that and have the players place them where they want. We use ace but sometimes we want the players to build a Full FOB which takes ages with the fortify tool. I have seen r3f logistics but its quite old and doesn't have the customisation we would like.
×