Jump to content

schadler17

Member
  • Content Count

    137
  • Joined

  • Last visited

  • Medals

Everything posted by schadler17

  1. Trying to get this script to basically restrict specific weapon sights based on Class. It works, but when the player has NO sights, it throws an error based on the _weaponSight variable not being able to find anything.. private ["_rClass", "_rItem", "_weaponSight", "_weaponSightName"]; while {true} do { _rClass = _this select 0; _rItem = _this select 1; _weaponSight = primaryWeaponItems player select 2; _weaponSightName = getText(configFile >> "CfgWeapons" >>_weaponSight >> "displayName"); sleep 3; if ((_weaponSight in _rItem) && !(typeOf player in _rClass)) then { player removePrimaryWeaponItem _weaponSight; hint format ["RESTRICTED WEAPON SIGHT\n\nYour class is not allowed\nto use %1.",_weaponSightName]; }; } forEach allUnits;
  2. schadler17

    Script to lock out player slots

    When you create the reserved unit in the editor, you'd edit the Description and Init locations, putting them in.
  3. What kind of server/mission are you looking for? This will be important if your looking for someone.
  4. Yeah I don't think them doors can be opened or closed.
  5. Make a .sqf file and add this too it. private ["_box"]; _box = _this select 0; waitUntil {sleep 0.5; time > 60}; //Will delete the box ~60 seconds after mission start deleteVehicle _box; Call for it by putting this in the init field of the box [this] execVM "myscript.sqf"; Or an easier way is doing what Revo said.
  6. ignore. I'm gonna be writing a gear restriction on players anyways, so no need for boxes to show specific gear by player class, now it'll just be per box type(weapons, ammo, equipment, radios, etc..)
  7. I'm creating an Ammobox script that will deploy different types of gear based on what class the ammobox is. It all works and I can create different boxes with different layouts. My question is, how would I make it so when a certain class opens the box, a certain list of items would appear, only for that players classname. So far, this is what I've got, and it deploys the Weapons/Ammo/Items I place in the arrays like I wanted, but now I want to restrict certain gear to only be seen by certain classes. // Ammo Box Loadout Based On Classname // Written by Schadler.C [TacBF Team] if (!isServer) exitWith {}; private ["_box", "_type"]; _box = _this select 0; _type = (typeOf _box); // Begin Ammobox Supplies while {alive _box} do { switch (_type) do { // Ammo Box 1 case "rhsusf_weapon_crate": { // Refresh Ammobox (Keeps From Duplication) clearMagazineCargo _box; clearWeaponCargo _box; clearItemCargoGlobal _box; // Weapons _box addWeaponCargoGlobal [""] // Ammo _box addMagazineCargoGlobal [""]; // Items _box addItemCargoGlobal [""]; sleep 60; // Box refresh timer }; }; };
  8. Yeah, a more in depth description of what the person your recruiting would work on would help. What kind of game mode or scripts are still being developed or do you need help with?
  9. I was looking at this Already and had something working, but messed it up and couldn't find out what I did wrong to it so I decided to rewrite what I had messed up lol. Thank you though, will post if I need further help setting it up.
  10. schadler17

    Script not working, no errors?

    Lol I noticed it right when I posted. Is there a better way of making addAction command menus? Right now I've got each addAction removing the previous ones with removeAllActions, which isn't really bad the way I'm using it, but I'm sure there's another more efficient way of doing it.
  11. schadler17

    Insurgent group looking for PvP Events!

    Tactical Battlefield could be a good idea for you guys. Although, its not always US vs Insurgents, but still good pure TvT gameplay. Always looking for more regular players.
  12. schadler17

    Arma 3 Eden Editor Sneak Preview Live Stream

    Available on Dev Version of Arma 3 now
  13. Or place a unit and look in the top right of the units placement box where you enter the init.
  14. I'm thinking my carrier script duplicates everytime someone JIP's into the game. I've spawned an object where I want the carrier and added the [this] execVM "script"; command to spawn it. Only problem is, I think when someone JIP's, it duplicates the carrier objects, resulting in about 630 objects on the map on a full server, sometimes overlapping, let alone everything else. _LHDspawn = _this select 0; _LHDdir = getdir _LHDspawn; _LHDspawnpoint = getposasl _LHDspawn; deletevehicle _LHDspawn; _parts = [ "Land_LHD_house_1", "Land_LHD_house_2", "Land_LHD_elev_R", "Land_LHD_1", "Land_LHD_2", "Land_LHD_3", "Land_LHD_4", "Land_LHD_5", "Land_LHD_6" ]; { _dummy = _x createvehicle _LHDspawnpoint; _dummy setdir _LHDdir; _dummy setpos _LHDspawnpoint; }foreach _parts; I've added if (!isServer) exitWith {}; to the beginning of it, but I'm not sure if that will work 100%. Any ideas?
  15. Okay thanks, should be fixed now.
  16. Yeah, I have an object with the init line to start the script. Adding the if (!isServer) line should stop it from running on JIPs, and only once on the server, correct?
  17. schadler17

    Detecting player classnames

    Exactly what I was looking for. I wasn't sure of where to put the classnames in question. Thank you very much.
  18. Gonna be making a gear script based on the players class. My question is, what's the fastest way of detecting the players classnames and assigning gear/items? I was thinking the switch command, but I'm not 100% sure how to use it. My other idea was the if then, but I'm not sure if that's the fastest way to do such a thing since there'd be so many possibilities. If possible could someone write a basic switch command for something like this so I can see the usage of it? Like said, I'm not sure of how to use it if I were to do it that way.
  19. Use an eventHandler to delete the unit everytime its "Fired"? This will delete it instantly, or you can set the EH to sleep for about 10 seconds then delete the unit. this addEventHandler ["Fired", {code}];
  20. This looks good, and if the servers I played on had a snow map, I'd ask for the script for it lol. But they dont, so I'm SOL until I talk them into adding more.
  21. I'm making a script to save a helicopters initial spawn location and to teleport it to another object(Helipad). My issue is, on respawn, the vehicle spawns back at the Helipad, not the original spawn location. Is there any way to call and save the _initspawn variable to be called on later? Or am I writing something wrong? vehicle_pos.sqf: private ["_veh","_pos_point","_pos","_initspawn"]; _veh = _this select 0; _initspawn = (getPosATL _veh); _pos_point = _this select 1; _pos = (getPosATL _pos_point); _veh addEventHandler ["Respawn", {_veh setPosATL _initSpawn}] _veh setDammage 0; _veh addEventHandler ["HandleDamage",{false}]; _veh setPosATL _pos; sleep 3; _veh removeEventHandler ["HandleDamage", 0] Trigger condition: (isServer ) and ({(_x isKindOf 'Air')} count thislist > 0) and (time > 30) On Act: {if(_x isKindOf 'Air') then {0 = [_x,helipos1] execVM "scripts\vehicle_pos.sqf"}} foreach thislist; The only problem is that when the helicopter respawns, its on the helipad, not the trigger which activates the script. I want the location of the trigger(_initspawn) to save the initial spawn location of the helicopter in editor to be called on in the Respawn EventHandler to set the position back to the original spawn location until the trigger fires again.
  22. You're right, seemed it was working but I noticed sometimes the heli's are spawning on the carrier, not on the spawn markers. Sometimes it works, sometimes not. Any way to fix the local variable so that it carries over to the Event Handler? Edit: Fixed it, just added the EventHandler to the init of the helicopters and changed the local variables to the object names. I use the init EH due to the Respawn script using createVehicle. this addEventHandler ["Init", {this setPosATL (getPosATL helispawn1)}]; Just gotta do this for each heli and change the name of the spawn location to the helipad object that I want it to initially spawn on(with the trigger). Will post here if I come across any other issues.
  23. Seems to be working in my case, as everytime the helicopter respawns it respawns at the _initspawn location.
  24. Fixed up the script a bit and finally got it working. I've been trying to find this out now for a few days, maybe a week lol. Thank you jshock for the tip about the event handler. Only thing I had to change was {_veh setPosATL ((_this select 1) to 0. 1 was calling the _pos_point object, not the helicopter. Other than that, it worked perfectly. Result: private ["_veh","_pos_point","_pos","_initspawn"]; _veh = _this select 0; _pos_point = _this select 1; _pos = (getPosATL _pos_point); _initspawn = _this select 2; _spawnpos = (getPosATL _initspawn); _veh setVariable ["vehicleSpawnPoint",_spawnpos,true]; _veh addEventHandler ["Respawn", {_veh setPosATL ((_this select 0) getVariable ["vehicleSpawnPoint",[0,0,0]])}]; _veh setDammage 0; _veh allowDamage false; sleep 2; _veh setPosATL _pos; sleep 3; _veh allowDamage true; My issue was I have a respawn script in a mod, but it was causing the helicopters that I wanted spawned ontop of the Carrier to blow up on Respawn. The initial spawn was fine, so I knew it was something with the way the respawn script is written(should be fixed next update, but I cbf'd to wait cause this mission is gona be bad ass lol.) My solution, creating 2 markers on the map and a trigger for each helicopter that I wanted spawned. Each helicopter and the initial spawnpoint is on the mainland, while the second marker is on the carrier with a fixed altitude for spawning the objects there and running this script on them.
×