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


  • 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


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







Found 102 results

  1. (Will cover 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 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
  2. I made some modifications to the A2Logistics tow/lift script a while ago and finally got around to making an official fork for anyone to use. It makes a better attempt at considering weights of vehicles to add a more realistic spin on towing and lifting. It should be fairly straightforward if you wish to modify anything. Here's some of the changes it brings: Adds tiers of vehicles by estimated weight such as Large, Medium, Small, and Tiny for Ground and Air vehicles. A vehicle can tow anything of it's own size or smaller. So a Large ground vehicle can tow any ground vehicle. A medium vehicle like an SUV can only tow other medium vehicles and smaller. A tank can tow any ground vehicle BUT can not be lifted A Large helicopter can lift small and tiny helicopters. A Large helicopter can lift any ground vehicle, whereas a medium helicopter can only lift medium and smaller. The airTug car (classname "TowingTractor" and other tractors) can tow any plane. Most boats are considered 'medium' cars Adds option to drop lifted vehicles when flying above 50 alt If you drop a vehicle above 50 alt, it will get a parachute and smoke grenade attached. "ParachuteBigWest" if large vehicle, otherwise "ParachuteMediumWest" Automatically translates for english, german, and french players on a per player basis. Previously the server developer had to choose one for all players You can find the download and install instructions HERE Enjoy!
  3. Here's a simple catapult launching script I made some time ago. By default, it requires an aircraft carrier but you could easily change it to work anywhere you wish. Video Example Download and install instructions here
  4. 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
  5. Hello Epoch Community i have installed AxeCops fantastic elevator mod and it works great with some tweaking on, 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. 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
  7. 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.
  8. I JUST LEAVE THIS ONE CUZ I KNOW YOU GUYS GONNA NEED IT.. The very old safezone script by infistar... i was using it in 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 OPTIONAL: @BetterDeadThanZed here you got. REMOVE LOOT FROM TRADER CITIES AND PLOT POLES. (should removes zeds from trader places and poles too)
  9. any one know how to change the color of text of DZMS or WAI missions
  10. 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 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.
  11. Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with
  12. 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
  13. 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
  14. 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.
  15. 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 = [];
  16. 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.
  17. juandayz

    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)
  18. 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
  19. 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
  20. 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;"; };
  21. 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)
  22. 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.
  23. 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
  • Create New...