Jump to content

Search the Community

Showing results for tags 'sqf'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
  • DayZ
    • Discussion
    • Public Servers
    • DayZ SA Resources
    • Q&A Section
  • ArmA 3
    • Epoch Survival
    • Community Projects
    • Q&A Section
    • Terrain Discussion
    • Resources
  • Arma 3 Resources
  • ArmA 2
    • General Discussion.
    • Q&A Section
    • Resources
    • Legacy Resources
    • A2: Community Projects
    • A2 Community Servers
  • Space Engineers
    • General Discussion.
    • Public Servers
  • Other Games
    • Discussion
  • Off Topic
    • Off Topic

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 17 results

  1. The loot spawning on my server will respawn or cycle right infrnt of you if you move more than 5m away or if someone else near you moves 5ft away. I check player_spawncheck.sqf and it looks fine. player_spawncheck.sqf //player_spawncheck.sqf private ["_isWreck","_maxControlledZombies","_looted","_zombied","_doNothing","_spawnZedRadius","_serverTime","_age","_nearbyBuildings","_position","_speed","_radius","_maxlocalspawned","_maxWeaponHolders","_currentWeaponHolders","_maxtoCreate","_inVehicle","_isAir","_isLand","_isSea","_Controlledzeddivided","_totalcrew","_nearby","_type","_config","_canSpawn","_dis","_checkLoot","_islocal","_bPos","_zombiesNum"]; _age = -1; //_nearbyBuildings = []; _position = [player] call fnc_getPos; _speed = speed (vehicle player); _radius = 200; //150*0.707; Pointless Processing (106.5) _spawnZedRadius = 20; /* //Tick Time PVDZ_getTickTime = player; publicVariableServer "PVDZ_getTickTime"; */ //Total Counts _maxlocalspawned = round(dayz_spawnZombies); _maxControlledZombies = round(dayz_maxLocalZombies); _maxWeaponHolders = round(dayz_maxMaxWeaponHolders); _currentWeaponHolders = round(dayz_currentWeaponHolders); //Limits (Land,Sea,Air) _inVehicle = (vehicle player != player); /* _isAir = vehicle player iskindof "Air"; _isLand = vehicle player iskindof "Land"; _isSea = vehicle player iskindof "Sea"; if (_isLand) then { } else { }; if (_isAir) then { } else { }; if (_isSea) then { } else { }; */ _doNothing = false; if (_inVehicle) then { _Controlledzeddivided = 0; //exit if too fast if (_speed > 25) exitwith {_doNothing = true;}; //Crew can spawn zeds. _totalcrew = count (crew (vehicle player)); if (_totalcrew > 1) then { _Controlledzeddivided = 2; //Dont allow driver to spawn if we have other crew members. if (player == driver (vehicle player)) exitwith {_doNothing = true;}; } else { _Controlledzeddivided = 4; }; if (_Controlledzeddivided > 0) then { _maxControlledZombies = round(_maxControlledZombies / _Controlledzeddivided); r_player_divideinvehicle = _Controlledzeddivided; }; }; if (_doNothing) exitwith {}; /*if ("ItemMap_Debug" in items player) then { deleteMarkerLocal "MaxZeds"; deleteMarkerLocal "Counter"; deleteMarkerLocal "Loot30"; deleteMarkerLocal "Loot120"; deleteMarkerLocal "Agro80"; _markerstr = createMarkerLocal ["MaxZeds", _position]; _markerstr setMarkerColorLocal "ColorYellow"; _markerstr setMarkerShapeLocal "ELLIPSE"; _markerstr setMarkerBrushLocal "Border"; _markerstr setMarkerSizeLocal [_radius, _radius]; _markerstr1 = createMarkerLocal ["Counter", _position]; _markerstr1 setMarkerColorLocal "ColorRed"; _markerstr1 setMarkerShapeLocal "ELLIPSE"; _markerstr1 setMarkerBrushLocal "Border"; _markerstr1 setMarkerSizeLocal [_radius+100, _radius+100]; _markerstr2 = createMarkerLocal ["Agro80", _position]; _markerstr2 setMarkerColorLocal "ColorRed"; _markerstr2 setMarkerShapeLocal "ELLIPSE"; _markerstr2 setMarkerBrushLocal "Border"; _markerstr2 setMarkerSizeLocal [80, 80]; _markerstr2 = createMarkerLocal ["Loot30", _position]; _markerstr2 setMarkerColorLocal "ColorRed"; _markerstr2 setMarkerShapeLocal "ELLIPSE"; _markerstr2 setMarkerBrushLocal "Border"; _markerstr2 setMarkerSizeLocal [30, 30]; _markerstr3 = createMarkerLocal ["Loot120", _position]; _markerstr3 setMarkerColorLocal "ColorBlue"; _markerstr3 setMarkerShapeLocal "ELLIPSE"; _markerstr3 setMarkerBrushLocal "Border"; _markerstr3 setMarkerSizeLocal [120, 120]; diag_log ("LocalZombies: " +str(dayz_spawnZombies) + "/" +str(dayz_maxLocalZombies)); //Logging diag_log (format["%1 Local.Agents: %2/%3, NearBy.Agents: %8/%9, Global.Agents: %6/%7, W.holders: %10/%11, (radius:%4m %5fps).","SpawnCheck", _maxlocalspawned, _maxControlledZombies, _radius, round diag_fpsmin,dayz_currentGlobalZombies, dayz_maxGlobalZeds, dayz_CurrentNearByZombies, dayz_maxNearByZombies, _currentWeaponHolders,_maxWeaponHolders]); };*/ // nearObjects is faster than nearestObjects when sorting by distance isn't needed // "Building" includes House and all of its child classes (Crashsite, IC_Fireplace1, IC_Tent, etc.) _nearby = _position nearObjects ["Building",_radius]; _maxlocalspawned = _maxlocalspawned max floor(_maxControlledZombies*.8); if (_maxlocalspawned > 0) then { _spawnZedRadius = _spawnZedRadius * 3; }; //Spawn Zeds & loot in buildings { _type = typeOf _x; _config = missionConfigFile >> "CfgLoot" >> "Buildings" >> _type; _canSpawn = isClass (_config); if (_canSpawn) then { _dis = _x distance player; _checkLoot = (count (getArray (_config >> "lootPos"))) > 0; _islocal = _x getVariable ["", false]; // object created locally via TownGenerator. //Make sure wrecks always spawn Zeds _isWreck = _x isKindOf "CrashSite"; //Loot if (getNumber(_config >> "lootChance") > 0) then { if (_currentWeaponHolders < _maxWeaponHolders) then { //Basic loot check if ((_dis < 125) and (_dis > 30) and !_inVehicle and _checkLoot) then { _serverTime = serverTime; _looted = (_x getVariable ["looted",_serverTime]); _age = _serverTime - _looted; //Building refresh rate if (_age == 0 or (_age > getNumber(_config >> "lootRefreshTimer"))) then { _x setVariable ["looted",_serverTime,!_islocal]; _x call building_spawnLoot; if (!(_x in dayz_buildingBubbleMonitor)) then { dayz_buildingBubbleMonitor set [count dayz_buildingBubbleMonitor, _x]; }; //diag_log [ diag_tickTime, "new loot at",_x,"age:", _age, "serverTime:", _serverTime]; }/* else { diag_log [ diag_tickTime, "won't spawn loot at",_x,"age:", _age, "serverTime:", _serverTime]; }*/; }; }; }; //Zeds if (getNumber(_config >> "zombieChance") > 0) then { if (_dis > _spawnZedRadius) then { _serverTime = serverTime; _zombied = (_x getVariable ["zombieSpawn",_serverTime]); _age = _serverTime - _zombied; if ((_age == 0) or (_age > 300)) then { if (!_isWreck) then { if ((dayz_spawnZombies < _maxControlledZombies) and (dayz_CurrentNearByZombies < dayz_maxNearByZombies) and (dayz_currentGlobalZombies < dayz_maxGlobalZeds)) then { _bPos = getPosATL _x; _zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 10)]); if (_zombiesNum == 0) then { _x setVariable ["zombieSpawn",_serverTime,!_islocal]; if (!(_x in dayz_buildingBubbleMonitor)) then { //add active zed to var dayz_buildingBubbleMonitor set [count dayz_buildingBubbleMonitor, _x]; }; //start spawn [_x] call building_spawnZombies; }; //diag_log (format["%1 building. %2", __FILE__, _x]); }; } else { _bPos = getPosATL _x; _zombiesNum = count (_bPos nearEntities ["zZombie_Base",(((sizeOf _type) * 2) + 30)]); //Should be a wreck if (_zombiesNum == 0) then { [_x,_isWreck] call building_spawnZombies; }; }; }; }; }; }; } forEach _nearby; At first I thought it was a respawn timer issue or something like that but if you don't move the loot will stay, you have to back away from it or someone else has to get within range and its not like you have to run away for this to happen, you can just back up a few steps and watch the loot change right infront of you. I have been playing around with it just trying to see if i can figure it out but if anyone knows what i should do or can at least point me in the right direction it would be a huge help. Thanks
  2. Dear reader, I have a question for anyone who is intereseted in helping me with an idea. The big idea is to build a "black market" where players can trade their stuff with eatother. i have been thinking of several methods that could be a solution because there are alot of problems in the idea. The first problem i encounterd is that: How do i update the players inventory ? i have come up with these 2 solutions: While restarting insert a cached array after that. restart the server. API method to the server? Which i dont know how to setup if anyone can provive me a link would be great. The second problem: What if the server doesn't have coin based economy? A: Does the player has to have the gold bars inside their safe? ... will continue to write but can't right now. you get the big picture. Can someone help me a little bit here? if it is even possible? - Chargedlight1
  3. So, as many will know, there is an issue in A2Epoch (possibily from DayZ) in the unique identifier generation not always producing unique identifiers. What is the unique identifier and how is it used ?. Epoch uses two object identifiers. ObjectID ObjectUID ObjectID is generated by the MySQL DB backend. ObjectUID is generated within the ARMA 2 game world via SQF code. Why two identifiers ?. For some reason... there is only one HiveExt.dll call to get the ObjectID for an object in the DB. This call is the one used to load all the DB objects in to ARMA. The offshoot of this is that when a new object is created and saved to the DB, the DB creates a unique objectID but this objectID cannot get back to the ARMA 2 game world until the ARMA 2 server process is restarted and all the objects are then read from the DB again. To get around this, the ObjectUID is created when a new object is created in the game world. This is used to reference the object in the game world and on the DB if the ARMA 2 engine does not know the DB assigned ObjectID. So, what is the problem ?. Whilst the code to generate a unique objectUID looks fairly good, it does not always create a unique ID. THis means that manipulation of any new objects that have not yet got an objectID in the game world (ie. created after the last server restart) but having an objectUID that matches the objectUID of an object currently in the DB will cause all sorts of problems. How is the objectUID calculated currently ?. There are three functions used to calculate the objectUID currently (all defined in server_functions.sqf). dayz_objectUID - No longer used it seems. dayz_objectUID2 - Used for objects objectUID generation. dayz_objectUID3 - Used for vehicle objectUID generation. dayz_objectUID just works out the required input parameters and then calls dayz_objectUID2. dayz_objectUID2 generates the objectUID for the object by applying the following calculation. x,y,z coords each multiplied by 10. Results made positive if required by multiplying by -10 and rounded to a whole number. 3 numbers are concatenated together (X + Y + Z). The objects direction (in degrees) after rounding is then concatenated to the result. dayz_objectUID3 does the same but adds the mission time (time in seconds since the ARMA 2 mission was started) to the direction value before adding it to the result for the x/y/x/ * 10 part. Worked example for dayz_objectUID2 Worldspace = [351.545[11079.8,11834.3,-0.380997]] = X = 11079.8 * 10 = 110798 Y = 11834.3 * 10 = 118343 Z = -0.380997 * 10 = -3.80997 * -10 (make positive) = 38.0997 round = 38 DIR = 351.545 rounded = 352 = concat 110798 + 118343 + 38 + 352 Calculated objectUID 11079811834338352 Stored ObjectUID 11079811834338352 So why is it not random ?. A set of coodinates ( [dir,[x,y,z]] ) for an object of [0,[1,1,10]] will produce the same result as a set of coordinates of [0,[1,10,1]]. The uniqueness plays on the probability of combination resulting in the same onjectUID being generated as unlikely. The more items you have in your DB then the more likely it is to happen. Ok, so what can we do about it ?. So this is the purpose of this thread. Both to highlight the issues to those who were not aware and to have a discussion on peoples thoughts on a better solution. I am curious as to why the code does not start at 0 and each time a objectUID is needed it just increments (possibly by 2 / 5 / 10). A server global variable could hold the current value and be populated on server restart by the highest objectUID found in the loaded objects. The only issue I can see is if multiple requests for a new objectUID resulted in the same objectUIDs being given out to multiple requestors as the global 'current objectUID' variable cannot be updated quickly enough. Presumabily that ould be managed by a basic schedualing system enforcing a FIFO queue so each request could be processed one at a time. Any other thoughts or observations ?. I am hoping we can all come up with a better solution that does not require any custom .dlls or DB table changes. Good news is that any new generation system should be pretty easy to plugin to Epoch. Over to you...
  4. Enjoy! Converter:So, the converter can do numerous things such as deobfuscate minifyed code by adding line breaks and spacings to your SQF which basically cleans up code and makes it look more organized, also can convert GUI Editors Class format to SQF, and and other cool stuffEncrypter:The encrypter can do things like SquareRoot String which converts the code into unicode numbers then obfuscates it using SquareRoot and converts it back to a string and other stuffThe list goes on on what you can do, I can't be bothered listing all of it here :PWebsite: http://sqf.io/Encrypter: http://crypt.sqf.io/Converter: http://convert.sqf.io/Images: http://imgur.com/a/0e4lBTo use the Encrypter just paste your SQF code on the left and convert it to what ever you want or just leave it if you want then format it on the right.Same thing with the Converter. (Input on left, output on right)Other Tools;SQM to SQF:https://github.com/SilentSpike/ARMA-SilentMapConverterSQF to BIEDI:https://github.com/JayWood/sqf_to_beidi*I don't own these tools.*CREDITS:JaywoodSilentSpikeSpeedyPS: If you have any more tools you want me to add to this thread just comment it, but I need to have permissions to post.
  5. i created a building on the server and used base management to export it no problems. My problem is because this does not come with a beidi file i couldnt drag it in to the editor, so hunted for a sqf. to beidi converter, found one still doesnt work as the converter requires veh numbers as seen in standard sqf. that im used to this doesnt contain these veh numbers so instead of this: _vehicle_23 = objNull; if (true) then { _this = createVehicle ["MAP_nav_pier_c_t20", [11770.883, 2644.2349, -4.3661213], [], 0, "CAN_COLLIDE"]; _vehicle_23 = _this; _this setDir -102.39177; _this setPos [11770.883, 2644.2349, -4.3661213]; }; i have this: ["MetalFloor_DZ",[4.6521,-3.0332,-0.283356],16.5208], ["MetalFloor_DZ",[4.65332,-3.03564,3.08607],16.5208], ["MetalFloor_DZ",[-1.90784,-6.59326,-0.283096],16.5208], ["MetalFloor_DZ",[-1.90991,-6.59668,3.08607],16.5208], ["CinderWallHalf_DZ",[-7.9978,0.726563,-0.533936],106.516], How do i get this into the editor? would i have to manually create the veh numbers then convert to beidi? any help would be greatly appreciated, thanks
  6. Hi all, I fail to find a sqf command that will fetch me the capacity of a magazine, something like _classname = "100Rnd_762x51_M240"; _maxRnd = GetAmmoCapacity(_classname);with a result of 100 in the _maxRnd variable. Surely there must be a way to do this without resorting to string analysis.
  7. axeman

    Read Me First

    Welcome to the AI Mission forum. Yes, we all want to make missions and put our mark on the game, give our players what they ask for and add our own ideas to the mod. Well, we welcome it and here is the place. Here we talk about .sqf and .fsm, configs, init.sqf, whatever is involved in creating a mission. Ask it, Code it, Post it ! Rules: 1) No Politics, long debates - Talking about how something, somewhere on the internet is not fair, or who said what ! Debate the merits of coding methods by all means. 2) No Breaking Epoch Code - Do not break our code, leave it be please until we release the final version. For a good reason, do you want to support changes in your mission every time we update the mod ? 3) Work with us, not against us. If it is in the Mod, we have done it that way for a reason, that reason is usually performance or for a better player experience. For example, don't try to 'find ways around' our server clean-up.The next update will almost certainly break your fix. We are always striving to improve and are open to suggestions. 4) All are welcome, respect others please. 5) Mission files etc. - Give credit for sources of your work. Guidelines: 1) DO NOT pander to your players - This is a survival experience ! Before giving in and making it easy for them, think how you can make them earn it and want it, and please make it painful, maybe a sea of sappers, just a suggestion. 2) Keep it clientside as much as you can. Not sure ? See Rule 3
  8. Hi! I was hoping anyone could find/make me a SQL query that would add the Overwatch items into the Database, I currently have one but I'd like the new weapons and stuff to be in separate menus, not all the Overpoch Assault riles to be in the normal Vanilla "Assault Rifles" tab and Overpoch Pistols in the vanilla "Pistols" tab etc etc. I had one before on my old server but I had to reset my PC and I lost the file to do it, I have looked around and I can't find the one I used :/
  9. Hi all, While re-developing ZFM I have found I need some useful tools which aren't really in one place at the moment. There are some existing tools for arrays, strings, and so on, which are useful, but their features are a bit haphazard and aren't consistent in what they offer. It's very annoying that SQF doesn't have any existing functions for doing things like string length, and all the rest, so I just thought "why not make one?" like I usually do. ZCR is a Common Runtime, meaning it's something you can include in your projects and use under an open-source license. ZCR brings PHP and c-like functions over to SQF for you to use and doesn't require including an additional module, just adding in a "call compile" at the top of your scripts. Documentation: https://github.com/zambino/zambinocommonruntime/wiki Where to get it: https://github.com/zambino/zambinocommonruntime How to install it Download the repo from the link above Extract the "ZCR" folder into the main folder your scripts are in. In the main init file/whichever file you want to use ZCR in, add in the following: call compile preprocessFileLineNumbers "ZCR/ZCR_init.sqf"; Happy trails.. What it provides: ZCR has the following functions as of 0.2: Strings: StrpBrk StrLen SubString StrPos Implode Arrays Array_Reduce (With callback) Array_Shuffle Array_Unique Array_Pop Array_Shift Array_Slice Array_Intersect Array_Chunk Array_Merge Array_Fill I will be providing a @Mod version of the library too with more features as I require them in ZFM. Happy developing, Zamboni
  10. *** Pin This Please *** Interested in helping the DayZ Community ? Learn to make your own Scripts SQF PDF Turtorial Sripting Commands ArmA2 New Scripting Commands List ArmA 2 New Scripting Commands List ArmA 2 OA Control Structures Data Types SQF Snytax Operators Mission Editor ArmA2/OA Scripts and Demos Please Like This Post If it Helps You Thank You.
  11. Generate a beidi from a misison.sqf You may have have seen this before thanks to Jerry at plugish.com, He has been kind enough to give me the source code, His current work will generate the beidi for _vehicles ONLY. This will include _units and _agents(epoch) Still a work in progress. Should be fully functional by Friday Link: http://craftdoge.com/converter.php
  12. hey guys thought id post here about my armaholic page that went up today. hopefully if the devs like it and use it, they will smash out code alot faster so we can all have some great fun :D. its basically a syntax highlighter + autocomplete + quick docs for the SQF language. i know alot of work gets done in c++ but hey thats what visual studio is for. and hopefully for the pbo side of things this will help :) http://www.armaholic.com/page.php?id=26952 also great work with epoch feels like you guys have a solid base to work from which is only promising for the future of the mod. and finnally excited for this combined with shoting from vehicles. life will be complete. any feedback or issues / suggestions to make it better greatly apreciated thanks.
  13. Hi, I'm trying to sync server diag_tickTime with cliente diag_tickTime, so i need to send "one to another" or "another to one" to sync then, and correct the error, that is, the ping at the moment of transmition. This correction is not exact, but i believe it will, in most cases, lower the error. But for this i need to know the client ping. There is any function that give, in a .sqf script, the player ping? Thankyou in advance!
  14. This is basically an airfield up north, decided to fill in a gap up there. I may well post a few updates to this edit when i come round too it a couple buildings are a little wonky but it wont do any harm. Features Barracks Industrial buildings Supermarket Fire station Random ship wreck Added Rocks and Trees Wrecked buildings for scenery Air strip (flat ish..) Here's the download for the sqf add that to your maps folder or wherever you decide to put your edits https://www.dropbox.com/s/1zfvwo6rseh1doc/Anglorum.sqf Images in the link below http://imgur.com/a/QyEmg#2 Have fun guys and enjoy
  15. So when I join this particular DayZ Epoch Taviana server, my client joins the lobby and upon pressing OK, my client loads the white bar under DayZ Logo until it finally gives my a small error about a config file (which I think it would normally pass) and then crashes. After 2-3 seconds a message box pops up and says "Include file z\addons\dayz_code\system\REsec.sqf not found." This is an ArmA 2 OA window and that's about all I know. Most research led me to believe it may be server-side and on the client receiving a response from the server with the code. Also attached is a snip of the window that pops up. Also forgot to add that I'm using DayZ Epoch 1.0.4.1 and server is running 1.0.4 as I couldn't manually download 1.0.4 without using DayZ Commander (which doesn't seem to want to download any mods for some reason). Any help is much appreciated, Bazerama
  16. Hi, I've been having some issues with a testing server i'm running on my LAN I have a whole bunch of map additions, and in three of these locations i have loot crates that are supposed to spawn. sometimes these spawn, other times they do not currently the map additions are in the server .pbo and the crates are in the mission files. I call the server side map additions from server_functions.sqf like so... // Map Additions call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\balota.sqf"; // balota barracks call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\tikhaya.sqf"; // tikhaya city near kamenka call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\zelebarracks.sqf"; // zelenogorsk barracks call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_SI_Zelenogorsk.sqf"; // GOC Zeleno Rehab Center call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_SI_Grishino.sqf"; // Grishino Construction Site call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_TE_htlh.sqf"; // Hero Trader Overhaul call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_TE_btcc.sqf"; // Bandit Trader Overhaul call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\zonealpha.sqf"; // Zone Alpha call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\blklakecamp.sqf"; // Black Lake Campsite call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\ne_airstrip.sqf"; // NEAF Additions call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\lopatino.sqf"; // Lopatino Barracks call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\novylugbase.sqf"; // Novy Lug Base call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\GOC_TE_bash.sqf"; // Bash Trader City Overhaul call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\NWAF.sqf"; // NWAF Military Compound call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\otmelvil.sqf"; // Otmel Village call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\Mine_grotte.sqf"; // Kamenka Mine call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\skalisty.sqf"; // Skalisty Island Village and Bridge // The Following Addons were made by 21DMD call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\solnichbike.sqf"; // Solnichiy Bike Dealer (made by jedish3ep aka jakehekesfists) call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\NWAFtrader.sqf"; // NWAF Trader (made by jedish3ep aka jakehekesfists) call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\smoosestaryfinal.sqf"; // Stary Trader (made by Smooose) call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\balotaimproved.sqf"; // Balota Improvements by jedish3ep aka jakehekesfists call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\berezimproved.sqf"; // Berezino Improvements by jedish3ep aka jakehekesfists call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\superhero.sqf"; // super hero trader by jedish3ep aka jakehekesfists call compile preProcessFileLineNumbers "\z\addons\dayz_server\map_additions\superbandit.sqf"; // super bandit trader by jedish3ep aka jakehekesfists and then i call the loot crates from init.sqf like so // Map Additions Loot [] execVM "map_additions\box_la_grotte.sqf"; [] execVM "map_additions\nwafcrates.sqf"; [] execVM "map_additions\zonealpha_loot.sqf"; // Map Additions, Map Markers - New Method - easier to clean [] execVM "custom\markers.sqf"; Previously I had tried to load all the additions serverside but the crates rarely spawned. I'm at a loss now as they only spawn sometimes. Does anyone have any tips to make these crates always spawn? in case required, heres one of my crates files if (isServer) then { _vehicle_999991 = objNull; if (true) then { _this = createVehicle ["TKVehicleBox_EP1", [7909.4,13691.2], [], 0, "CAN_COLLIDE"]; _vehicle_999991 = _this; _this setDir 20; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addWeaponCargoGlobal ["NVGoggles",2]; _this addWeaponCargoGlobal ["Binocular_Vector",2]; _this addWeaponCargoGlobal ["ItemGPS",2]; _this addWeaponCargoGlobal ["ItemEtool", 2]; _this addWeaponCargoGlobal ["ItemFlashlightRed", 2]; _this addMagazineCargoGlobal ["Skin_Camo1_DZ", 2]; GunRandomizerA=floor(random 4); if (GunRandomizerA == 0) then { _this addWeaponCargoGlobal ["MakarovSD", 2]; _this addMagazineCargoGlobal ["8Rnd_9x18_MakarovSD", 25]; _this addWeaponCargoGlobal ["FN_FAL",2]; _this addmagazineCargoGlobal ["20Rnd_762x51_FNFAL",20]; _this addWeaponCargoGlobal ["DMR_DZ",2]; _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",20]; _this addWeaponCargoGlobal ["M4A1_HWS_GL", 2]; _this addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 30]; _this addWeaponCargoGlobal ["AK_107_kobra", 1]; _this addMagazineCargoGlobal ["30Rnd_545x39_AK", 30]; _this addWeaponCargoGlobal ["M4A1_AIM_SD_camo",2]; _this addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 30]; _this addWeaponCargoGlobal ["BAF_L85A2_RIS_SUSAT",2]; }; if (GunRandomizerA == 1) then { _this addWeaponCargoGlobal ["M9SD", 1]; _this addMagazineCargoGlobal ["15Rnd_9x19_M9SD", 25]; _this addWeaponCargoGlobal ["SVD_CAMO",2]; _this addmagazineCargoGlobal ["10Rnd_762x54_SVD",20]; _this addWeaponCargoGlobal ["M107_DZ",2]; _this addmagazineCargoGlobal ["10Rnd_127x99_m107",20]; _this addWeaponCargoGlobal ["G36K_camo",2]; _this addmagazineCargoGlobal ["30Rnd_556x45_G36",30]; _this addWeaponCargoGlobal ["M4A1_HWS_GL_SD_camo",2]; _this addMagazineCargoGlobal ["30Rnd_556x45_StanagSD", 30]; _this addWeaponCargoGlobal ["AKS_74_U", 1]; _this addMagazineCargoGlobal ["30Rnd_545x39_AK", 30]; _this addWeaponCargoGlobal ["BAF_L85A2_RIS_SUSAT",2]; }; if (GunRandomizerA == 2) then { _this addWeaponCargoGlobal ["UZI_SD_EP1", 1]; _this addMagazineCargoGlobal ["30Rnd_9x19_UZI_SD", 25]; _this addWeaponCargoGlobal ["SCAR_H_LNG_Sniper_SD",2]; _this addmagazineCargoGlobal ["20Rnd_762x51_SB_SCAR",20]; _this addWeaponCargoGlobal ["M4A1_AIM_SD_camo", 2]; _this addMagazineCargoGlobal ["30Rnd_556x45_Stanag", 30]; _this addWeaponCargoGlobal ["RPK_74", 2]; _this addMagazineCargoGlobal ["75Rnd_545x39_RPK", 25]; _this addWeaponCargoGlobal ["AK_74_GL", 2]; _this addMagazineCargoGlobal ["30Rnd_545x39_AK", 30]; _this addWeaponCargoGlobal ["BAF_L85A2_RIS_Holo",2]; }; if (GunRandomizerA == 3) then { _this addWeaponCargoGlobal ["MakarovSD", 2]; _this addMagazineCargoGlobal ["8Rnd_9x18_MakarovSD", 25]; _this addWeaponCargoGlobal ["VSS_vintorez",1]; _this addmagazineCargoGlobal ["20Rnd_9x39_SP5_VSS",20]; _this addWeaponCargoGlobal ["M40A3",2]; _this addmagazineCargoGlobal ["5Rnd_762x51_M24",20]; _this addWeaponCargoGlobal ["SVD", 2]; _this addMagazineCargoGlobal ["10Rnd_762x54_SVD", 20]; _this addWeaponCargoGlobal ["FN_FAL", 2]; _this addMagazineCargoGlobal ["20Rnd_762x51_FNFAL", 30]; _this addWeaponCargoGlobal ["MP5A5", 2]; _this addMagazineCargoGlobal ["30rnd_9x19_MP5", 30]; _this addWeaponCargoGlobal ["M240_DZ", 2]; _this addMagazineCargoGlobal ["100Rnd_762x51_M240", 25]; }; _this addbackpackCargoGlobal ["DZ_LargeGunBag_EP1",5]; _this setPos [7909.4,13691.2]; }; _vehicle_999992 = objNull; if (true) then { _this = createVehicle ["USVehicleBox", [8020.13,13633.4], [], 0, "CAN_COLLIDE"]; _vehicle_999992 = _this; _this setDir 130; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addmagazineCargoGlobal ["PartEngine",5]; _this addmagazineCargoGlobal ["PartGeneric",10]; _this addmagazineCargoGlobal ["PartVRotor",5]; _this addmagazineCargoGlobal ["PartWheel",10]; _this addmagazineCargoGlobal ["PartFueltank",3]; _this addmagazineCargoGlobal ["PartGlass",10]; _this addmagazineCargoGlobal ["ItemJerrycan",3]; _this addmagazineCargoGlobal ["50Rnd_127x107_DSHKM",5]; _this addmagazineCargoGlobal ["100Rnd_127x99_M2",5]; _this addmagazineCargoGlobal ["4000Rnd_762x51_M134",5]; _this addmagazineCargoGlobal ["100Rnd_762x51_M240",5]; GunCrateSRandomizer=floor(random 3); if (GunCrateSRandomizer == 0) then { _this addmagazineCargoGlobal ["ItemGoldBar10oz",6]; }; if (GunCrateSRandomizer == 1) then { _this addmagazineCargoGlobal ["ItemSilverBar10oz",12]; }; if (GunCrateSRandomizer == 2) then { _this addmagazineCargoGlobal ["ItemBriefcase10oz",1]; }; _this setPos [8020.13,13633.4]; }; _vehicle_999993= objNull; if (true) then { _this = createVehicle ["TKVehicleBox_EP1", [8007.18,13638.1], [], 0, "CAN_COLLIDE"]; _vehicle_999993 = _this; _this setDir 90.560677; clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; _this addWeaponCargoGlobal ["NVGoggles",1]; _this addWeaponCargoGlobal ["ItemGPS",1]; _this addmagazineCargoGlobal ["ItemBandage",10]; _this addmagazineCargoGlobal ["ItemPainkiller",10]; _this addmagazineCargoGlobal ["ItemMorphine",10]; _this addmagazineCargoGlobal ["ItemBloodBag",10]; _this addmagazineCargoGlobal ["ItemEpinephrine",10]; _this addmagazineCargoGlobal ["ItemAntibiotic",10]; _this addmagazineCargoGlobal ["FoodCanBakedBeans",2]; _this addmagazineCargoGlobal ["FoodCanSardines",2]; _this addmagazineCargoGlobal ["FoodCanFrankBeans",2]; _this addmagazineCargoGlobal ["FoodCanPasta",2]; _this addmagazineCargoGlobal ["FoodCanGriff",2]; _this addmagazineCargoGlobal ["FoodCanBoneboy",2]; _this addmagazineCargoGlobal ["FoodCanCorn",2]; _this addmagazineCargoGlobal ["FoodCanCurgon",2]; _this addmagazineCargoGlobal ["FoodCanDemon",2]; _this addmagazineCargoGlobal ["FoodCanFraggleos",2]; _this addmagazineCargoGlobal ["FoodCanHerpy",2]; _this addmagazineCargoGlobal ["FoodCanOrlok",2]; _this addmagazineCargoGlobal ["FoodCanPowell",2]; _this addmagazineCargoGlobal ["FoodCanTylers",2]; _this addmagazineCargoGlobal ["ItemSodaCoke",4]; _this addmagazineCargoGlobal ["ItemSodaPepsi",4]; _this addmagazineCargoGlobal ["ItemSodaMdew",4]; _this addmagazineCargoGlobal ["ItemSodaMtngreen",4]; _this addmagazineCargoGlobal ["ItemSodaR4z0r",4]; _this addmagazineCargoGlobal ["ItemSodaClays",4]; _this addmagazineCargoGlobal ["ItemSodaSmasht",4]; _this addmagazineCargoGlobal ["ItemSodaDrwaste",4]; _this addmagazineCargoGlobal ["ItemSodaLemonade",4]; _this addmagazineCargoGlobal ["ItemSodaLvg",4]; _this addmagazineCargoGlobal ["ItemSodaMzly",4]; _this addmagazineCargoGlobal ["ItemSodaRabbit",4]; _this addmagazineCargoGlobal ["Skin_Drake_Light_DZ",2]; _this addmagazineCargoGlobal ["Skin_FR_OHara_DZ",2]; _this addmagazineCargoGlobal ["Skin_FR_Rodriguez_DZ",2]; _this addmagazineCargoGlobal ["Skin_CZ_Soldier_Sniper_EP1_DZ",2]; _this addmagazineCargoGlobal ["Skin_Graves_Light_DZ",2]; _this addbackpackCargoGlobal ["DZ_LargeGunBag_EP1",2]; _this setPos [8007.18,13638.1]; }; }; any help would be greatly appreciated. Edit: another possible thought, could it possibly be DZMS or WAI missions deleting these boxes as part of a cleanup script?
  17. I'm guessing this is probably pretty easy to do. I'm just not familiar enough with SQF. The first place I'm looking to do it is with some loot crates. Basically I want them to show up in positions, randomly selected from an array, per restart. So for instance: positionArray = [[8103.18,13557.3],[8102.68,13476.3],[8020.13,13633.4],[8098.68,13542.8]]; positon = positionArray[floor(random positionArray.length)]; _this = createVehicle ["TKVehicleBox_EP1", position, [], 0, "CAN_COLLIDE"]; _this setPos [position]; Thanks in advance! -Silk
×
×
  • Create New...