Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About Odderino

  • Rank
  1. This doesn't really help, as I said I'm new to coding, so I have no idea how to string anything together. I have already been on the Arma 3 scripting sight, and I did try to do something similar to what you did above to no success.
  2. I currently have a script in a sqf file that allows me to whitelist certain weapons to certain classes. It looks like this: (Only the parts that matter) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #define AT_MSG "Only AT Soldiers may use this weapon system. Launcher removed." _missileSoldiers = ["B_soldier_LAT_F","B_soldier_AA_F","B_soldier_AT_F","B_officer_F","B_recon_LAT_F"]; _missileSpecialised = ["launch_NLAW_F","launch_B_Titan_F","launch_O_Titan_F","launch_I_Titan_F","launch_B_Titan_short_F","launch_O_Titan_short_F","launch_I_Titan_short_F"]; if (({player hasWeapon _x} count _missileSpecialised) > 0) then { if (({player isKindOf _x} count _missileSoldiers) < 1) then { player removeWeapon (secondaryWeapon player); titleText [AT_MSG,"PLAIN",3]; }; }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (this is not my code, but I do understand everything except why the >0 and <1 is there.) _missileSpecialised would be the rocket launcher itself _missileSoldiers would be the class I would want to have it (and it would be restricted to only that class) I am trying to make it so no matter what I put in _missileSpecialised (mainly weapon, uniform, vest, backpack and helmet) it will take it away from the player if they are not in the _missileSoldiers parameter. The script currently only takes away weapons, and how seeing how there is no counterpart to the hasWeapon command (ex. there is no hasUniform or hasVest) I would be very grateful for some extra help. AT_MSG is just the message displayed when the weapon is taken away from you I tried to fiddle with the code myself, but I have just started learning and this is way outside my skillset, seeing how it probably needs an entire rewrite, as it is only taking away the secondary weapon as of now, and only detecting if you have a WEAPON in the _missileSpecialised section, and not any other items. Also, I am trying to run this on a dedicated server, which to my understanding may require slightly altering parts of code (something with underscores I believe). Thank you to any kind soul in advance.
  3. It works! Thank you for your patience.
  4. On my own server, hosted by Host Havoc.
  5. Nothing above works, is there a possibility something could be conflicting with it? Do I have to tell the server to load initPlayerServer.sqf in another file? I didn't have that file before, so I just made one and put the code in there.
  6. Still allows me to play as the class, after doing everything above, I even defined End1 in my description.ext: class CfgDebriefing { class End1 { title = "You all died!"; subtitle = ""; description = "Everyone is dead."; pictureBackground = ""; picture = "KIA"; pictureColor[] = {0.6,0.1,0.2,1}; }; }; This was just a debug, it would be changed later, but it still does not end the mission.
  7. Sorry to sound like an idiot, but where do I find this?
  8. Tried everything above. I can still play as the squad leaders despite my own ID not being in the whilelisted UID parameter.
  9. Doesn't work, still allows me to access whitelisted classes despite my ID not being in the whitelist. I tried: Changing the values in _whitelistedSlots Putting the script in my init.sqf Putting the script in my initServer.sqf
  10. I was wondering if there was a certain way to restrict certain classes to certain users on my server? The server runs on a modified Invade and Annex base, so classes are currently setup like this: class Item0 { position[]={15280.771,17.870386,17400.666}; azimut=-201.653; special="NONE"; id=0; side="WEST"; vehicle="SWOP_Clonetrooper"; player="PLAY CDG"; leader=1; rank="LIEUTENANT"; skill=0.60000002; text="s40"; init="(group this) setGroupId [""ALPHA""];"; description="Alpha Squad Leader"; syncId=0; synchronizations[]={70}; }; Vehicle is the name of an NPC, and spawns you with all the equipment the NPC wears. I think restricting the "vehicle" string to a certain User ID would be the best course of action. Something like: If player = SWOP_Clonetrooper and Player UID is not in list then display: You are not whitelisted for this slot and then something with BIS_fnc_endMission Obviously this is not how code works, and would appreciate any help!