Jump to content

Horner

Member
  • Content Count

    627
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by Horner

  1. Then my FNC_Trigger function wouldn't work, it would boost the Triggered PV a single value on each client. Disregard my post. Thanks Iceman
  2. _crate setPos [_pos select 0, _pos select 1, _pos select 2];
  3. if (isServer) then { Triggered = 0; publicVariable "Triggered"; }; FNC_Trigger = { if (!isServer) exitWith {}; Triggered = Triggered + 1; publicVariable "Triggered"; }; waitUntil {Triggered >= 4}; endMission "LOSER"; //Can use other types Then in your triggers' OnActs. [] call FNC_Trigger; Not sure if trigger code is run on the server, don't deal with triggers much.
  4. Call like so null = [this] execVM "crateRespawn.sqf"; In crateRespawn.sqf private["_crate","_type","_pos","_newCrate"]; _crate = _this select 0; _type = typeOf _crate; _pos = getPos _crate; waitUntil {_crate distance _pos > 1}; _newCrate = _type createVehicle _pos; [_newCrate] execVM "crateRespawn.sqf"; That should work for what you want, if I understand correctly.
  5. I've had listboxes that have more then 10 options. Dunno, maybe you're not using the correct style to get a scrolling effect? Does the list go longer if you make the height larger?
  6. What bardosy said, the if condition only restricts the code in the if condition's scope. if (condition) then {statement}; With anything inside of {} being the scope.
  7. When you say "menu" we have no idea what you're talking about, do you mean a listbox?
  8. Or make a new version to only run for a single unit.
  9. You can completely disable it with this. http://community.bistudio.com/wiki/Description.ext#disableChannels
  10. Not tested, run on server. Only works for units already placed down. if (!isServer) exitWith {}; private["_iUnit","_loadout"]; Loadout_Array = [ ["Rifleman",["M4A1"],["30RND_556x45_STANAG"]], ["Medic",["M16A2"],["30RND_556x45_STANAG"]] ]; FNC_GetLoadout = { private["_unit","_type","_weps","_mags","_ret"]; _unit = _this select 0; _type = typeOf _unit; _weps = []; _mags = []; for "_i" from 0 to (count Loadout_Array) do { if (_type == ((Loadout_Array select _i) select 0)) then { _weps = ((Loadout_Array select _i) select 1); _mags = ((Loadout_Array select _i) select 2); }; }; _ret = [_weps,_mags]; _ret }; for "_i" from 0 to (count allUnits) do { _iUnit = allUnits select _i; _loadout = [_iUnit] call FNC_GetLoadout; removeAllWeapons _iUnit; { _iUnit addWeapon _x; } forEach (_loadout select 0); { _iUnit addMagazine _x; } forEach (_loadout select 1); }; Obviously you can add more loadouts and I don't even know if those classnames exist.
  11. Use a global variable instead of a local variable Also it would be wise to not have this script run each time you use an action, just run it on the client and change the global variable with the action.
  12. Horner

    Arma2MySQL

    www.dropbox.com :)
  13. execVM is a command not a condition.
  14. _PIDList = [ "PID", "PID" ]; if (!(getPlayerUID player in _PIDList)) exitWith { hint "You are not an admin!"; };
  15. Please don't bump your threads unless you've waited a long time, someone will get to your question. It's hard to help people with no actual problem, I suggest you learn a bit about SQF before wanting to jump into something more advanced like an interactive GUI. http://community.bistudio.com/wiki/Category:Scripting_Topics
  16. Just like you do anything :P [nil,player,rSideChat,format["%1",_txt]] call RE;
  17. https://community.bistudio.com/wiki/Variables Pretty much anything before a single equals sign (=) is a variable in arma. No variable type definition needed like in CPP.
  18. Really depends on what you're trying to do, honestly. JIP functionality isn't always a must but for some features it is. I've played great ArmA 2 missions that didn't have a single line of code in them (apart from some triggers and the mission.sqm ofc).
  19. Horner

    December 2012 status update

    Well, this is disappointing news, but non-the-less not unexpected. First of all, congrats on the new position Joris, I hope you do well. Now, we all know (or at least consider) that DayZ was one of the best things that happened business-wise for BIS in years. So it's understandable that they're putting a lot of their resources towards pushing out a DayZ standalone, it's just good for business. People just need to realize that BIS is a business, and they're not just here for the community. Sure, they are more involved with their community than any other gaming company out there, but that doesn't mean they're going to make bad choices just to make the community happy. Also, I agree that pushing out ArmA 3, based in Limnos may cause some unnecessary tension in Greece as well for Ivan and Martin. Sure it's a disappointment, sure it's not what we want to hear, but BIS is one of the best game developing companies I've ever seen, and I'm happy to play ArmA 2 for another half a year if needed. Thank you for the information, and good luck.
  20. If the onAct part means it's in a trigger you can just use thisList {[nil,_x,"loc",rHINT,"Some hint"] call RE;} forEach thisList;
  21. Having addon signature checking on should do the trick most of the time.
  22. if (isNil (getText (configFile >> "CfgPatches" >> <insert A2 CfgPatches entry>))) exitWith { disableUserInput true; hint "You need ArmA 2 to play our mission!"; };
  23. https://community.bistudio.com/wiki/selectPlayer should work.
  24. Remove the comma after your set of quotation marks in skeletonBones[], that should do it.
×