Jump to content

Meowzors

Member
  • Posts

    157
  • Joined

  • Last visited

Posts posted by Meowzors

  1. weapons_list = [];
        _cfgweapons = configFile >> 'cfgWeapons';
        for "_i" from 0 to (count _cfgweapons)-1 do
        {
            _weapon = _cfgweapons select _i;
            if (isClass _weapon) then
            {
                _key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
                if (getNumber (_weapon >> "scope") == 2 and getText(_weapon >> "picture") != "" and !(configName(inheritsFrom(_weapon)) in _key_colors)) then
                {
                    _wpn_type = configName _weapon;
                    weapons_list set [count weapons_list, _wpn_type];
                    diag_log text format ["WeaponList: %1",_wpn_type];
                };
            };
        };
    

    and

    magazines_list = [];
        _cfgmagazines = configFile >> 'cfgMagazines';
        for "_i" from 0 to (count _cfgmagazines)-1 do
        {
            _magazine = _cfgmagazines select _i;
            if (isClass _magazine) then
            {
                if (getNumber (_magazine >> "scope") == 2 and getText(_magazine >> "picture") != "") then
                {
                    _mag_type = configName _magazine;
                    magazines_list set [count magazines_list, _mag_type];
                    diag_log text format ["Ammo List: %1", _mag_type];
                };
            };
        };
    

     

    This code will give you a list of all weapons and ammo available to spawn to your RPT.

  2. Why don't you just make a marker for that location in mission.sqf like so....

     

    class Item28
            {
                position[]={22599.2,0.001,19685.8};     //{X,Z,Y}
                name="SectorB";
                type="Empty";
            };

     

    make sure to increment the number Item# by one and the amount of markers by 1 at the top of the markers array.

     

    then make a sensor where a variable is set to true when the player is in that area... again increment item and amount of items by 1

     

    class Item4
            {
                position[]={22599.2,0.001,19685.8};
                a=600;
                b=600;
                activationBy="WEST";
                repeating=1;
                interruptable=1;
                age="UNKNOWN";
                name="SectorB";
                expCond="(player distance SectorB) < 800;";
                expActiv="sectB=true; canbuild = false; clearzeds = [] execVM ""custom\clearzeds.sqf"";";
                expDesactiv="canbuild=true; sectB=false; terminate clearzeds;";
                class Effects
                {
                };
            };

     

    In my example here when you are within 800m of sectorB a script is called inside "expActiv" which clears zeds clearzeds = [] execVM ""custom\clearzeds.sqf"".  When you leave sectorB inside expDesactiv it terminates clearzeds.

     

    You could make a script that runs that lets you do what you want as I have done using sensors.  Using never ending loops is never good practice and drops the FPS of your clients.

  3. Is there a benefit to having config traders over database traders? I like a small mission file and config traders does quite the opposite.  Also, where would one find zupas single currency script install details as it seems so many scripts use that and people like it?  Not exactly the right place to ask these but this script uses both so meh :P AND lastly... great work zupa

  4. The problem u r running into with being able to spawn them in is most likely that u need to add them to ur allowed objects list in ur variables.sqf

    The rest of this post I'm unsure of what u r wanting... Do u have electro housing working and want the old housing to go away when u build an electro or r u wanting ur lvl 1 to go away when u build a lvl 2?

  5. the missing semi colon in the RPT points to line 8... line 8 is:

     

    _mags=magazineCargo Crate;
    

     

    a semi colon inside of the count _mags is not needed ( i did however try putting one there when I originally had all my lines with "count magazoneCargo Crate"--still said missing ; )

  6. I am trying to check a crate for a certain number of an item....

     

    i tried this...

    _playerName = name player;   //line 7
    _mags=magazineCargo Crate;   //line 8
    _weps=weaponCargo Crate;     //line 9
    _OreQTY={_x == "PartOre"} count _mags;
    _PoleQTY={_x == "ItemPole"} count _mags;
    ...
    

    which results in this error....

    _mags=magazineCargo Crate;
    _weps=weaponCargo Crate>
      Error position: <Crate;
    _weps=weaponCargo Crate>
      Error Missing ;
    File mpmissions\__CUR_MP.Tavi\custom\finish_build.sqf, line 8
    

    Can anyone tell me whats going on here??? There are no missing ; as far as I can see here...

  7. if we get something like that working then we can just run that on the gate in server monitor at server startup and then add the event handler back when unlock script is called and remove it when locked. Playing with other things at the moment and dont have time to test/play with this atm just throwing out ideas

  8. well I am wondering...

     

    you can do: _unit removeAllEventHandlers "GetIn";

     

    to remove the option to get in a vehicle...

     

    can you do: _unit removeAllEventHandlers "open";

     

    or something like that to remove the eventhandler for opening the door.  I am not sure if "open" is the name of the door opening event

×
×
  • Create New...