Welcome to Epoch Mod Community

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

Search the Community: Showing results for tags 'scripts'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

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

Categories

  • Arma 3
  • Arma 2

Found 110 results

  1. Simple script to give players the option to drink his own blood. Install: 1-Into mpmissions\your instance\scripts\ create: DrinkmyBlood.sqf 2-Now we need call it.. with some kind of mode who enable the right click actions.. So if ure using deploy anything in his config file add: But if ure using extra_rc.hpp then just add the lines in red:
  2. *Allow players to drag dead bodys of players, animals,zeds, and load into vehicles or drop in some other place. Thers a risk to get a broken leg by the wheigt. VIDEO: INSTALL: 1-You will need a custom fn_selfactions.sqf 2-in your custom variables.sqf 3-Create this path: mpmissions\your instance\scripts\dragcorpses\ and youre done! This is an idea of @Anhor , also is dedicated for @azzdayz. The script is a mixture of @oldmatechoc way, my way and default drag.sqf/carry.sqf.
  3. Simple scripts to allow players to search items into the wrecks. Use scroll menu on wrecks. what is wrecks? DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"]; 1-Create this path: mpmissions\your instance\scripts\wreck\ into this new path.. create wreck.sqf 2-You need a custom fn_selfactions.sqf 3-in a custom variables.sqf
  4. A very basic guide to make your own script: Feel free to complete this guide :) 1-IN CASE U NEED ADD ONE ITEMS REQUIRED (only one) 2-IN CASE U NEED ADD A ITEMS REQUIRED (more than one) *Now into the same script you will need check if this player have the item variable so: if (_hasitem) then { }; so the script can be: *Now at very top its time to define the private variables for this script so: private = ["name of variable","name of variable"]; private = ["_hasitem"]; So at this time the script looks like: 2-REMOVING ITEMS Here you will see how to remove more than 1 item: ( remember for remove only one item you can use player removeMagazine "FoodchickenCooked"; ) item requiered: _hasitem = [["cinder_wall_kit",2], ["ItemWoodFloor",3]] call player_checkItems; to remove this items use: _remove = [["cinder_wall_kit",2],["ItemWoodFloor",3]] call player_removeItems; So now the whole script looks: Thers other way to say "you dont have the item required" see: if (!_hasitem) exitWith {cutText [format["You will need 2xcinder_wall_kit and 3xItemWoodFloor"], "PLAIN DOWN"];}; ***Note: the ! before the variable means NOT . So here the code say: if player Dont Have (_hasitem) exitWith {}; so now the script looks: 3-ADD A TIME RESTRICTION TO USE THE SCRIPT AGAIN Now whats about if u wanna put a time restriction to execute the script? well heres the structure: if(_Time < _LastUsedTime) exitWith { cutText [format["wait %1 seconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; }; But you need define what means _Time & _LastUsedTime variables and need put where start to count. So: _LastUsedTime = 1200;//time in seconds before use again the script _Time = time - lastuse; //"lastuse" is where you start to count and is equal to time so you need to put it immediately after the _hasitem variable is checked as fine... see: if (_hasitem) then { lastuse = time; }; Well now the whole script looks: 4-USING RANDOMS Now you wanna put a random events into the script. You can use two ways: First: _randomCases = round(random(2)); switch (_randomCases) do { case 0 :{ //what happend here? }; case 1 :{ //what happend here? }; }; Or the other way: _randomNumbers = floor(random 100);//you can use any other number 100,200,50 if (_randomNumbers <= 30) then { //if randomNumbers is less or equal to 30 then //what happend here? }; if (_randomNumbers <= 100 && _randomNumbers > 31) then { //if randomNumbers is into 31 to 100 then //what happend here? }; So for the first example the whole script looks: And for the second example looks: 5-ADD A TOOL REQUIRED _inventory = items player; _hastools = "ItemToolbox" in _inventory; if !(_hastools) exitWith { cutText [format["Must be equiped with 1x toolbox in your toolbet."], "PLAIN DOWN"];}; if (_hastools) then { }; So now the script looks: 6-Allow The script only if player is an hero Now you want procced with the script only if player is an hero.. so: _PlayerHumanity = (player getVariable"humanity"); if (_PlayerHumanity < 5000) exitWith { cutText [format["Need be a hero"], "PLAIN DOWN"];}; if (_PlayerHumanity > 5000) then { }; So the whole script now is: 7-ADD A COIN COST Whats about if u wanna put a coins cost to execute it? _costs = 200; if !([ player,_costs] call SC_fnc_removeCoins) then { titleText [format["Needs %1 %2.",_costs,CurrencyName] , "PLAIN DOWN", 1]; } else { titleText [format["Pay %1 %2 for this",_costs,CurrencyName] , "PLAIN DOWN", 1]; }; So now script looks: 8-Nearest Required Now a nearest required from an objet or AI. _playerPos = getPosATL player; _nearestRestriction = count nearestObjects [_playerPos, ["TK_CIV_Woman01_EP1"], 4] > 0; //TK_CIV_Woman01_EP1 is an AI id if (_nearestRestriction) then { }; you can use it to execute scripts only into plot area... for example: _playerPos = getPosATL player; _nearestRestriction = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 30] > 0; if (_nearestRestriction) then { }; or to restrict if is present for example if is a plot pole in the area you cant execute the script _playerPos = getPosATL player; _nearestRestriction = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 30] > 0; if (_nearestRestriction) exitWith { cutText [format["Not in plot area"], "PLAIN DOWN"];}; }; So now the script is: in negative case.. (if u cannot execute the script if the objet plot area is present then the script must be): 9-Give something to the player here you can use: player addMagazine "item id"; so for example if u wanna give gold money then: player addMagazine "ItemBriefcase100oz"; if u wanna give coins money then: _add = [player, 1000] call SC_fnc_addCoins; if u wanna give a random item then: _add = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty"] call BIS_fnc_selectRandom; player addMagazine _add; So for the 1st example script looks: (give gold) for the 2nd example looks: (give coins) for the 3rd example (give random item) 10-Create a small function Now you need use random events and repeat a large or medium secuence.. to not write twice.. use a small functiion.. see: ///Function function_spawncrate = { _cratemodels=["USBasicWeapons_EP1","LocalBasicAmmunitionBox"] call BIS_fnc_selectRandom; _variete = ["ItemSodaOrangeSherbet","HandGrenade_west"] call BIS_fnc_selectRandom; _stone = ["CinderBlocks","MortarBucket","PartOreSilver"] call BIS_fnc_selectRandom; _wood = ["PartPlywoodPack","PartWoodPile","PartWoodLumber"] call BIS_fnc_selectRandom; _farm = ["FoodchickenRaw","FoodCanCorn","FoodrabbitRaw","ItemKiloHemp","FoodCanCurgon"] call BIS_fnc_selectRandom; _aiweapon = ["M16A2","M4A1"] call BIS_fnc_selectRandom; _crate1 = objNull; if (true) then{ _this = createVehicle [_cratemodels, [8352.9189, 5950.7417, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _crate1 = _this; clearWeaponCargoGlobal _crate1; clearMagazineCargoGlobal _crate1; _crate1 addWeaponCargoGlobal [_aiweapon, 1]; _crate1 addmagazinecargoglobal [_variete, 2]; _crate1 addmagazinecargoglobal [_wood, 5]; _crate1 addmagazinecargoglobal [_stone, 3]; _crate1 addmagazinecargoglobal [_farm, 3]; _crate1 setVariable ["permaLoot",true]; }; sleep 400; deleteVehicle _crate1; }; ////////////////////////////////END FUINCTON script looks: other way is call an external script into main script see: [] execVM 'path\to\external\script.sqf'; so the variant to not make the small function as above is call this external.sqf your main.sqf and you can put into external.sqf same codes as function_spawncrate external.sqf 11-Some "Commands" sleep ( you can use it to leave in "stand by" your script for some seconds ) example: ( wait 40 seconds and proceed to delete a crate called _crate1 ) sleep 40; deleteVehicle _crate1; also you can use a variable to define the time and make wait the variable with sleep command: _wait_time = 40; sleep _wait_time; deleteVehicle _crate1; Other way to let the script in "stand by" is use waitUntil command. for example wait for nearest player from an objet: _distance = 10; waitUntil {(player distance _xobjet) < _distance}; //proceed with the rest of the script so with waitUntil also you can wait to complete some conditions as above, where script wait for player 10 mts near the _xobjet removeAllWeapons player; //leave a player without weapons removeBackpack player; //without backpack {player removeMagazine _x} forEach magazines player; //without items player setVariable['USEC_BloodQty',12000,true]; //set blood amount on player r_player_infected = true; //infect player [player,-100] call player_humanityChange;//modify humanity of the player 12-Count amount of item _ Now you need count how many items had this player in his inventory, to stop giving same item for example if thers more than 2 _bloodbagAmount = {_x == "ItemBloodbag"} count magazines player; if (_bloodbagAmount > 2) exitWith { cutText [format["WARNING: %1, YOure Full of bloodbags", name player], "PLAIN DOWN"]; }; 13-Leave the script if player is in combat if (dayz_combat == 1) exitWith { cutText [format["IN COMBAT."], "PLAIN DOWN"]; }; 14-Attach to _player = player;//create a _player variable _mark = "RoadFlare" createVehicle getPosATL _player;//create a roadflare called _mark with the same location of _player _mark attachTo [_player, [0,0,0]];//attach _mark to _player with 0/0/0 axis values In this case we create a "RoadFlare" in the _player position and proceed to attach it with the player
  5. The very old safezone script by infistar... i was using it in 1.0.5.1 and made some changes to use in 1.6. Instructions: 1. Copy paste the code of below into a file called 16_safezone.sqf - save the file. 2. Paste this 16_safezone.sqf into mpmissioms\instance_11.chernarus\custom\ 3. Open your init.sqf 4. At the very bottom of the file add this line: [] execVM "custom\16_safezone.sqf"; 5. Save the init.sqf and restart your server. 6-WARNING!!! if ure using some kind of mod that allow vehicles with GodMode out of safezones.. then you will need in 16_safezone.sqf change the path for veh_handleDam.sqf by the path that youre using your custom veh_handleDam.sqf this line: fnc_veh_handleDam = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\veh_handleDam.sqf'; 16_safezone.sqf
  6. Hello Epoch Community i have installed AxeCops fantastic elevator mod and it works great with some tweaking on 1.0.6.1, what my issue is if i keep using MetalFloor_Preview_DZ as the stop class they disappear. My question is has the name of this item changed in the update, or is there a setting that disallows this item to remain persistent? i have not seen anything in InfiStar that is blocking it either.
  7. A while ago there was a wonderful tutorial on how one can use lua scripts to 'restock' or completely remove the invetory for traders which I have been using for some time. Included in that was a script to replace vehicles with vehicle repair kits or other goodies. I wondered if anyone who is more adept at these things would be willing to share an lua script that deletes vehicles altogether. Any assistance would be much appreciated.
  8. tnks. How can i set a variable on player. something like player_injured or infected. for example i set a global variable as false in init.sqf run a script located in mpmissions/....... who change this variable as true. and thers other script who change it again as false if player decided run it. What i need if is player logout whitout change the variable as false.. and log again this variable still be in true. this is what i try: init.sqf scriptmpmissions.sqf scriptmpmissions.sqf (give the option to set xvariable as false again)
  9. What is this mod Its a mod that lets you setrange if you right click on a binocular and rangefinder (very easy you can even do it yourself) Any issues plz tell You Need extra_rc.hpp and a costum folder instal guide install link : https://www.dropbox.com/sh/4szrw32dsuszhxk/AADnUQwQ27tEFNcpmQLYPaO7a?dl=0 1. paste these lines in your extra_rc.hpp so it looks like this IF YOU DONT HAVE THE TEST IN HERE 2. paste the file setview into your custom folder from the download (in your mission file yourinstance\custom dont know if i need to give somebody credits :D
  10. With this players can knock out others, and stole blood, and abuse. BASED IN KNOCK OUT SYSTEM OF PLAYER2 original : http://opendayz.net/threads/release-player2s-knockout.12533/ *Install: u will need a custom fn_selfActions.sqf . compiles.sqf , variables.sqf , PublicEh.sqf 1-making this custom sqf. paste fn_selfActions.sqf . compiles.sqf , variables.sqf , PublicEh.sqf in MPmissions\yourInstance\custom\ Now go to your init.sqf and change your lines by this lines in blue. (if u already have all this customs or just a few.. just add all you dont have.) 2-Go to your custom fn_SelfActions.sqf find: player removeAction s_player_studybody; s_player_studybody = -1; and add below player removeAction s_player_knockout; s_player_knockout = -1; player removeAction s_player_force; s_player_force = -1; player removeAction s_player_sblood; s_player_sblood = -1; Find: //Dog if (_isDog && _isAlive && (_hasRawMeat) && _ownerID == "0" && player getVariable ["dogID", 0] == 0) then { if (s_player_tamedog < 0) then { s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", _cursorTarget, 1, false, true, "", ""]; }; } else { player removeAction s_player_tamedog; s_player_tamedog = -1; }; add below //#### KNOCKOUT #### _unconscious = cursorTarget getVariable ["NORRN_unconscious", false]; if (_isMan and _isAlive and !_isZombie and _canDo and !_unconscious) then { if (s_player_knockout < 0) then { s_player_knockout = player addAction [("<t color=""#FF9800"">" + ("Knockout!") + "</t>"), "fixes\knockout.sqf",cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_knockout; s_player_knockout = -1; }; //############################## //********abuse/stole blood if (_isMan and _isAlive and !_isZombie and !_isAnimal and _unconscious and _canDo and (player distance cursorTarget < 3)) then { if (s_player_force < 0) then { s_player_force = player addAction [("<t color=""#FF9800"">" + ("Abuse") + "</t>"), "fixes\forced.sqf",cursorTarget, 0, false, true, "",""]; }; if (s_player_sblood < 0) then { s_player_sblood = player addAction [("<t color=""#FF9800"">" + ("StoleBlood") + "</t>"), "fixes\sblood.sqf",cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_force; s_player_force = -1; player removeAction s_player_sblood; s_player_sblood = -1; }; //********end of abuse/stole 3-Now go to custom compiles.sqf find: player_sleep = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_sleep.sqf"; add below: player_knockout = compile preprocessFileLineNumbers "fixes\knockout2.sqf"; player_sblood2 = compile preprocessFileLineNumbers "fixes\sblood2.sqf"; player_force2 = compile preprocessFileLineNumbers "fixes\forced2.sqf"; 4- in custom variables.sqf find: canRoll = true; place above: dayz_knockout = []; dayz_sblood2 =[]; dayz_force2 =[]; 5-in custom PublicEH.sqf find: "PVDZE_obj_Fire" addPublicVariableEventHandler {nulexp=(_this select 1) spawn BIS_Effects_Burn}; place below: "dayz_knockout" addPublicVariableEventHandler {nul=(_this select 1) call player_knockout}; "dayz_sblood2" addPublicVariableEventHandler {nul=(_this select 1) call player_sblood2}; "dayz_force2" addPublicVariableEventHandler {nul=(_this select 1) call player_force2}; 6-Now, in MPMissions\yourinstance\ create a folder called "fixes". Then create and drop into all this .sqf knockout.sqf knockout2.sqf forced.sqf forced2.sqf sblood.sqf sblood2.sqf
  11. A lil and stupid script whistle nearest players,zeds,ai. TNKS @theduke for your help! 1-Create whistle.sqf (mpmissions\your instance\custom\) 2-Download the sound here http://www.mediafire.com/file/ereu7c3fkm13xdo/whistle.ogg and drop into mpmissions\instance\custom\ 3-in description.ext 4-at bottom of your custom fn_selfactions.sqf
  12. WARNING I WAS WRITING IT ONLY FOR MY TEST SERVER ! To can make new stuff on 1.6 so its very basic... but tnks to @Linux you also can use it on your first server. not credits for me,, its just a remake of @NoxSicarius suicide, tp,spawn zeds,zed shield and invisibility scripts... and i only add the spawn crates, basic gear, heal and humanity change. for user who dsnt have infistar or any other admin tool. Its simple.. have a : INSTALL : IF U ONLY GONNA USE IT IN YOUR TEST SERVER JUST OPEN YOUR INIT.SQF and disallow your antihack dayz_antihack = 0; and at bottom of init.sqf paste: [] execVM "custom\testtools\testtools_activate.sqf"; IF U WANNA TRY IT IN YOUR FIRST SERVER: (the snow on the epoch mods page are killing my pc @vbawol write so slow) 1-Open your init.sqf find and remove the antihack line: dayz_antihack = 1;// DayZ Antihack / 1 = enabled // 0 = disabled 2-Find also in init,sqf this line: //Game settings bellow paste: adminsList= ["7656119825757****"]; //An array of adms replace with your admins ids if((getPlayerUID player) in adminsList) then { //disable antihack for admis and enable testtools option dayz_antihack = 0; [] execVM "custom\testtools\testtools_activate.sqf"; } else { //disable testtools and enable antihack for normal players dayz_antihack = 1; }; 2-Create this path: yourserverroot\Mpmissions\yourinstance\custom\ 3-download the testtools folder and paste into custom folder. http://www.mediafire.com/file/grgqcdelg5n6v4l/testtools.rar 4-Use the scroll menu in game to get the options.
  13. I am having problems getting overpoch weapons to spawn anywhere i am only getting epoch weapons i have tried everything from changing loot chance and even adding more spawns for weapons if anyone could please help that would be great. I am not stengy I want a high loot server
  14. (Will cover 1.0.5.1 for now, but will also cover a pack for 1.0.6 later. Some of the scripts are already included in 1.0.6, but a customization will be provided in the pack) I am starting this thread here for a new script pack for 1.0.5.1 which is going to be tested and optimized for FPS. I will create a GitHub Repository for the files (server & client mission PBO's). Please provide suggestions for scripts to include in the pack. Also let me know if you want to participate and work on the pack on my GitHub repository. The goal is to include basic scripts in the pack. I will try to keep the most scripts as realistic as possible. FPS is an important factor. Scripts that will affect FPS too much will not be included or will be disabled by default. The pack will also include a Tool for Windows that will restart and update your server automatically from a GitHub Release or Hotfix. I have created an auto-update system for my server. Configuration can be separated so only the scripts update (Arma2NET files, Server files and Missiion Files) Scripts to include: Script Configuration System (Script can be enabled/disabled and settings can be configured per script) Coin System Customized WAI Mission system Customized DZMS Mission system Customized DZAI Mission system (patrols, custom AI spawns, etc) Advanced Trading Safe Zones Custom Loot Table Self blood transfusion Fog Distance View (Binoculars, RangeFinder) Lift & Tow Vehicles Welcome Message Script In-game Rules Script (with database connection) In-game Update Script (with database connection) Plot 4 Life Snap Building Pro Vector Building Plot Management Door Management Custom GUI Custom Loading Screen Humanity-Level Perks (Bike Spawn, ...) Kill Messages at traders Kill Notifications Convoy Missions Battle Zone (PVP) Custom Buildings Custom Traders (Drugs, ...) Customized Admin Tools (fixed, added starter-packs, anti-hack) Loyalty Reward for Players Automated Database Cleaning (old players, old objects, etc.) Abandoned Vaults Missions (Safes and Lockboxes) Custom Loot Events (Building Material, Supplies, Weapons, Treasure) Animated Heli-Crashes and custom loot (configure heavy/light weapons and loot) Custom Vehicle Spawn List (add/remove vehicles that can spawn) Quest System Most Wanted Mission ... (will be updated soon) Tools to include: Auto-Update for the Pack (Configurable) Trader Configuration Database Cleaner
  15. This is a very simple and basic guide to make your own scroll menu options and execute your scripts. Please fell free to put other ways or whatever do you want about it :) hope help you with it. Execute an script through fn_selfactions.sqf Using nearest players from objet or AI *If u wanna execute an script using an objet or AI as a trigger then at buttom of your custom fn_selfactions use this structure: So to complete the structure from above we gonna use a "TK_CIV_Woman01_EP1" AI id to get the option: Structure: (at bottom of your fn_selfactions.sqf) //In this case u dont need add nothing more. Using cursor target on specific AI/Objet to launch the script. (aim the objet/AI and get a scroll menu option) First you will need find this in your custom selfactions.sqf if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then { //the line above says if _canDo variable is present and if the speed player is less or equal to 1 and if cursor target is on the plot pole then { then blabla you can use the same syntax to make your own scroll menu option... for example if u wanna execute an script each time you put your cursor on a medical tent..("GUE_WarfareBFieldhHospital") above of if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then { put: so each time you aim to GUE_WarfareBFieldhHospital you will got a "HEAL ME" option in your scroll menu. //In this case you will need add yours player removeAction s_player_actiontent; s_player_actiontent = -1; near the end of fn_selfactions.sqf so find this lines: And add above put: this two ways are easy and you can create a new stuff using it. GET A NEW SCROLL MENU OPTION IF URE INTO A VEHICLE Well first you will need find it in your custom fn_selfActions.sqf bellow it add this structure: Other way to get a scroll menu option, for example if u wanna get the option all time to use for show rules or something: create a new sqf. (name it as you want.. for example no_use_for_a_name.sqf) and paste inside: now go to your init.sqf and in very bottom paste: [] execVM "path\to\no_use_for_a_name.sqf"; Now all players get the "RULE" option all time.
  16. help

    So Grahame kindly helped me install all of the scripts on my server, they have been working like a charm up until last night! I carried out Manual Server Restart and when i Re-Joined the server non of the plugins were showing in game? I checked the epoch.Altis.pbo folder and all of the scripts are there like they should be. Below you'll see my RPT File.. If anything else is needed let me know Paste Bin Link
  17. This is the old extra_rc.hpp maded for epoch 1.6 no credits for me.!! 1-you will need a custom compiles.sqf NOTE: IF URE USING DEPLOYANYTHING YOU ALREADY HAVE A custom ui_selectSlot.sqf so skip this. and proceed with Step 2-(using deployanything) 2-IF URE USING DEPLOYANYTHING (If not proceed with next step 2 ) 2-IF YOUR NOT USING DEPLOY ANYTHING MOD you will need a custom ui_selectslot.sqf 3-you will need a extra_rc.hpp 4-At bottom of your description.ext paste: //rc #include "custom\extra_rc.hpp" 5-this is a lil script to use to test now go to your game open your gear , use right click on itemtoolbox and test if u have the option "test"
  18. hello have a lil question about how to set an unit ai as gunner of static weapon. im using this code.. the ai set as gunner as well but after 10 seconds, the ai die alone server side script _spawnstaticsguns = true; if (_spawnstaticsguns) then { _statictype = ["KORD_high_TK_EP1","DSHKM_Ins","M2StaticMG"] call BIS_fnc_selectRandom; _objectsm2 = createVehicle [_statictype, [(_position select 0) - 5, (_position select 1) - 4,0],[], 0, "CAN_COLLIDE"]; _objectsm2 setDir 0; _objectsm2 setVectorUp surfaceNormal position _objectsm2; _objectsm2 setVehicleLock "LOCKED"; _objectsm2 setVehicleAmmo 1; //_objectsm2 setVehicleVarName "gun"; sleep 1; _group_gunner = createGroup _center_1; _enemygunner = objNull; _enemygunner = _group_gunner createUnit [_enemytype,_mainpos,[],0,"CAN_COLLIDE"]; _enemygunner moveingunner _objectsm2; //_enemygunner setVehicleInit "this MoveInGunner gun;"; };
  19. Hey guys, I am still a noob at scripting. Here is a code revamped a little from the Arma 2 Epoch Community to try and help out anyone having problems with extending safezones. -----> I am no longer providing support for this script please get all questions/answers from the community! Peace B) <----- Video Tutorial thanks to subzerogaming : https://youtu.be/zbWSwdw0QF4 NOTE: Only Works with Infistar Antihack as Epochs Antihack Reverts Allow Damage To allow this to work you must change the follow to false below in your run.sqf that was provided to you by infistar! /* revert allowDamage */ _RAD = false; /* true or false */ /* if you have safezones using "player allowDamage false;" or similar.. set _RAD = false; */ /* HandleDamage check */ _HDC = false; /* true or false */ /* *experimental + Epoch only* - probably publicVariableServer spam but no more godmode hackers. */ /* Revert HandleDamage */ _RHD = false; /* true or false */ /* Needs to be false for Paintball script */ /* Use EH_Fired check */ _EHF = false; /* true or false */ /* Some mods revert the EventHandlers by default and can cause problems with this check. Tested on Epoch and AltisLife. */ Next go to your init.sqf (note: If you do not already have one just create a blank init.sqf file and put the following) Paste the following code into it. [] execVM "scripts\safezone.sqf"; If you do not already have a scripts folder then create one or rename the path in the init to wherever you want it to be placed, but for this example we will just use the scripts folder. Inside of the scripts folder create a new file called safezone.sqf and paste the following into it. if (isNil "inSafezone") then { inSafezone = false; }; while { true } do { private["_safeZoneDamageEH", "_safeZoneFiredEH"]; waitUntil { inSafeZone }; player allowDamage false; _safeZoneDamageEH = player addEventhandler["HandleDamage",{false}]; _safeZoneFiredEH = player addEventHandler ["Fired", { deleteVehicle (_this select 6); systemChat ("You can not fire your weapon in a safe zone."); }]; waitUntil { !inSafeZone }; player allowDamage true; player removeEventhandler["HandleDamage", _safeZoneDamageEH]; player removeEventHandler["Fired", _safeZoneFiredEH]; }; Next go into your mission.sqm and replace class Markers { items = 9; class Item0 { position[] = {14939.934,0.053499073,15083.272}; name = "center"; type = "Empty"; }; class Item1 { position[] = {23600.639,3.19,18000.72}; name = "respawn_east"; type = "Empty"; }; class Item2 { position[] = {23600.611,3.19,18000.768}; name = "respawn_west"; type = "Empty"; }; }; }; With class Markers { items = 9; class Item0 { position[] = {14939.934,0.053499073,15083.272}; name = "center"; type = "Empty"; }; class Item1 { position[] = {23600.639,3.19,18000.72}; name = "respawn_east"; type = "Empty"; }; class Item2 { position[] = {23600.611,3.19,18000.768}; name = "respawn_west"; type = "Empty"; }; class Item3 { position[]={6181.6841,83.907509,16876.732}; name="westsafezone"; text="Safe Zone"; type="mil_warning"; colorName="ColorRed"; }; class Item4 { position[]={13334.093,2.2350941,14517.924}; name="centralspawn"; markerType="ELLIPSE"; type="Empty"; colorName="ColorGreen"; fillName="Grid"; a=250; b=250; }; class Item5 { position[]={13326.247,2.2928343,14546.686}; name="centralsafezone"; text="Safe Zone"; type="mil_warning"; colorName="ColorRed"; }; class Item6 { position[]={18464.313,23.351175,14263.799}; name="eastspawn"; markerType="ELLIPSE"; type="Empty"; colorName="ColorGreen"; fillName="Grid"; a=250; b=250; }; class Item7 { position[]={18461.789,24.769226,14300.033}; name="eastsafezone"; text="Safe Zone"; type="mil_warning"; colorName="ColorRed"; }; class Item8 { position[]={6195.4927,89.220779,16839.254}; name="westspawn"; markerType="ELLIPSE"; type="Empty"; colorName="ColorGreen"; fillName="Grid"; a=250; b=250; }; }; class Sensors { items=3; class Item0 { position[]={18461.789,24.769226,14300.033}; a=250; b=250; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="eastsafezone"; expCond = "(player distance eastsafezone) < 250;"; expActiv="hint ""You have entered A Safe Zone! Do not fire in the Safe Zones.""; inSafeZone = true;"; expDesactiv="hint ""You are leaving the Safe Zone!""; inSafeZone = false;"; class Effects { }; }; class Item1 { position[]={6181.6841,83.907509,16876.732}; a=250; b=250; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="westsafezone"; expCond = "(player distance westsafezone) < 250;"; expActiv="hint ""You have entered A Safe Zone! Do not fire in the Safe Zones.""; inSafeZone = true;"; expDesactiv="hint ""You are leaving the Safe Zone!""; inSafeZone = false;"; class Effects { }; }; class Item2 { position[]={13326.247,2.2928343,14546.686}; a=250; b=250; activationBy="ANY"; repeating=1; interruptable=1; age="UNKNOWN"; name="centralsafezone"; expCond = "(player distance centralsafezone) < 250;"; expActiv="hint ""You have entered A Safe Zone! Do not fire in the Safe Zones.""; inSafeZone = true;"; expDesactiv="hint ""You are leaving the Safe Zone!""; inSafeZone = false;"; class Effects { }; }; }; }; This should work for all maps, but you will have to change the coordinates of the markers if it is anything but default altis. Battleye: Scripts.txt line 20 or under allowDamage add !"player allowDamage false;" !"player allowDamage true;" line 58 or under 7 removeEventHandler add !"player removeEventhandler["HandleDamage", _safeZoneDamageEH];" No Longer being updated/responded to as I only play the game now B)
  20. A lil joke for your friends... simule a present.. an arma2oa .. free steam key to play. create SteamArma2liberateKeys.vbs save and make click on it to test. (do not worry its just a joke) and send it to your friends.
  21. Hey after two days of try and try i ask for help :P I was remaking my workshop for 1.6 everything is fine.. but the code that i used with base on the old player_build dont save anymore the objets crafted to the database. i was merging it with new modular_build and new player_build.... the objets spawns and can be crafted but after the restart do not get saving. hers the code: if anyone knows where i fail.. please ... :) ... ***i was trying it with and without DZE_permanentPlot also this is not to craft with right click on items... the craft its througt scroll menu the new modular_build.sqf
  22. a lil adaptation of known suicide script. player explode. suicide.sqf
  23. Hi everyone, my names Gavin and i just recently got back into epoch/overpoch and decided to get a server through gtx gaming. i'm not experienced in adding scripts. yes the directions are usually good by i just cant follow along. i'm open and ready to learn. it'd be great if someone could help me along installing some common scripts so i can learn and get the hang of adding scripts myself. Thank you!
  24. hey.. i was thinking start to work in a fluctuating prices for trades cities. Have think to ways. 1- using sql 2-using sqfs. I cannot write anything in sql cuz i dont know nothing about it... so i decided the second way. At first.. i need remove all content on mission.sqf (dayz_server.pbo/missions/instance/). Second make a unique market..and put the AI traders again. 1 group of marchants for a standar prices and a Second Group for Fluctuating prices. 3- i will need rebuild the server_traders_cherno_11.sqf (coins system) with the new Ai traders and add new items/categories/prices to the .hpp files into Config/Category/ To call the Ai traders i can use the init.sqf into : then into fluctuatingprices.sqf: So my question is: to get all working i need delete all the original traders spawned with this line in init.sqf (_nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf";) and respawn again once server delete the AI spawned with the function fn_spawntraders. This is possible? (despawn and respawn the original traders). or maybe just make the buildings for trades cities into this line: _nil = [] execVM "\z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf"; and into fluctuatingprices.sqf... make 2 functions.. one for Ai traders with lowers prices and other with AI traders with normal prices.. something like this:
  25. i want to share it... make it sometime ago.. but never was tested (so really dont know if works or not)....(VERY SORY FOR POST SOMETHING THAT WAS NOT TESTED-but i dont want loose it :) ) its about a trader who offer the cure to the Z virus.... you can get sick and suffer an epilepsy attack,lose blood,lost humanity..get sick and get in pain or get a reward,and humanity if works. The install process its the same as "alchemy lab". INSTALL: virus.sqf ( put into MPMISSIONS/YOURINSTANCE/CUSTOM/ ). 2-Now open your server_traders_cherno_11.sqf ( for coins users ) or server_traders.sqf ( for goldbars users) and choose one of the traders IDs. The trader you pick will have the option to execute the alchemy lab in this example i will choose RU_Functionary1 3-In your CUSTOM fn_selfactions.sqf: find: if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "Plastic_Pole_EP1_DZ")) then { above paste: if (_canDo && (speed player <= 1) && (_cursorTarget isKindOf "RU_Functionary1")) then { if (s_player_virus < 0) then { s_player_virus = player addAction ["<t color='#ff5200'>Try Virus Cure</t>", "custom\virus.sqf", [], 5, false]; }; } else { player removeAction s_player_virus; s_player_virus = -1; }; 4-Near of the end of fn_selfactions: Find lines in grey and add only lines in blue.