Jump to content

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 115 results

  1. [Find Items on Wreck]

    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
  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. 1.6 Safezone

    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
  4. Trader Convoy

    This script creates a caravan of traders who travel around the map - open a small market somewhere for a while, and they leave away to next city. (it's like "Traders In Move" in 1.0.5.1) Install: 1. in your dayz_server.pbo, add a sqf file named "TraderConvoy.sqf" contains below: 2. in the bottom of dayz_server\init\server_functions.sqf , add a line to spawn TraderConvoy.sqf that you added like this: this file must be run by "execVM," not "call compile bra-bra-brah" --- Nown Issue: The traders get deleted in safezones by AI remover of SafeZone script.
  5. AxeCops Elevators in 1.0.6.1

    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.
  6. Autorun Scripts

    I wrote a quick script to add autorun to Epoch. Dowload from the link below and read the install instructions in the download. https://github.com/Ghostrider-DbD-/Epoch.Altis-Autorun/blob/master/Epoch.Altis/addons/DBD/canRun.sqf
  7. [EPOCH CEMETARY]

    Well i took the @raymix suggestion and add his random locations. also i added a "Who lies here?" option. This Remove dead bodys and drops all dead players in a random cemetarys. Death bodys spawns as a CrossHelmet with a crate with all his items (a merge with bury corpses) and if ure using coins youre be able to "check wallet" on the dead crate. You just need Define a pos for the cemetary. (Must be a Big place to prevent issues.) Anyway i choose one pos for you.. in Kumyrna Town but you can change it and add a marker. Take care with the mark body option in configvariables. dsnt needed since thers no body.. and the ooption in ESSV3 spawn in body. VIDEO: (in cherno map) 1-Make a custom player_death.sqf.. (You know place it in mpmissions and call it from custom compiles.sqf) 2-player_death.sqf 3-into scripts\zsc\ create study_body.sqf 4-in your custom fn_selfactions.sqf 5-in your custom variables.sqf change this line for place your cemetary in other location: _cemeteries = [ [[5205.2866, 8582.541,0],"kabanino"], [[8332.0488, 5945.0884, 0],"kumyrna"], [[10020.204, 5512.1753,0],"staroye"], [[11184.681, 12290.43,0],"krasnostav"], [[8531.7148, 11980.951,0],"Gvozdno"], [[6201.606, 10397.821,0],"Grishino"], [[4569.5361, 6375.5166,0],"pogorevka"], [[7417.0859, 5195.2876,0],"mogilevka"] ]; this other line define a safepos for the dead cross Find position minimum 1m from from Cemetary but not further than 20m, not closer than 2m to any other object, not in the water, maximum gradient of 20, not on the shoreline: _position = [_customPosition, 1, 20, 2, 0, 20, 0] call BIS_fnc_findSafePos;
  8. Damage Map addons.

    Small script for damage default cities. Do not use largest values on ratio... may causes lows fps. damage_cities.sqf and at bottom of init add: execVM "scripts\damage_cities.sqf"; Done! You also can add other things to damage.. for example _target = [4185.0303,4157.5503,0]; _damage_ratio=150; _server_x= _target nearObjects [["vehicles","Man"], _damage_ratio]; {_x setdammage 1} forEach _server_x; i dont know was usefull for me to simulate a nuclear dessease
  9. Humankills.BanditKills,Zedkills

    Is there any way to keep the values of this variables humanKills //zombieKills// banditKills . after player die? I mean you kill 10 zeds 10 bandits and 10 survivors/heros .. then you die and respawn with the sames values. like humanity variable (persistent). cannot found where is reseted to 0.
  10. 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"
  11. AI KILLED BY HACKER

    anyone know how to remove this from rpt 0:53:48 ["z\addons\dayz_server\system\scheduler\sched_safetyVehicle.sqf","KILLING A HACKER","Haikal Saikal"," IN ","Su25_Ins"] The sqf who spawn it: (located in mpmissions\ and called manually by scroll menu) variables.sqf ( DZE_safeVehicle = ["ParachuteWest","ParachuteC","Su25_INS"]; ) i also try comment the line in sched_veh as you know.. the AI is not killed by the comment line.. but i leave the diag_log to see if still rpt spawns.. and it does. and also add the "su25_INS" in dynamic_vehicle.sqf Ohh also i have the "TK_Commander_EP1" in Allplayers = [];
  12. [Rewrite] Drink My Blood

    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:
  13. 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
  14. 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.
  15. Player variable

    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)
  16. 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
  17. 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
  18. [Whistle Players,Zeds,AI]

    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
  19. UPDATED 06/13/2017 I WROTE THIS ADM PANEL FOR MY TEST SERVER. IS A REMAKE OF @NoxSicarius admintools. like a little admintools or something like this and have an easier install. You can see the options that it have from above (in the pic). INSTALL: old version
  20. 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
  21. (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
  22. 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.
  23. Problem with scripts not showing

    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
  24. 1.6 SET AI AS GUNNER

    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;"; };
  25. Extended Safezone Script - Working!

    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)
×