Jump to content

looter809

Member
  • Posts

    219
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    looter809 reacted to Tarabas in [scarCODE] S.I.M. (Server Info Menu) by IT07   
    finding github bases of scripters in old link ? just delete till only the name is there anymore.. for example https://github.com/IT07/
    there in gamcode/ Arma 3 / A3_scarCODE_Bundle  you'll find the code for that
  2. Like
    looter809 got a reaction from juandayz in 1.6.2 NEW RUBBLETOWN   
    [ ["RPK_DZ","RPK_DZ","PKM_DZ","PKM_DZ"], ["75Rnd_545x39_RPK","75Rnd_545x39_RPK","75Rnd_762x39_RPK","75Rnd_762x39_RPK","100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","ItemSodaPepsi","ItemSodaPepsi","ItemSodaPepsi","ItemSodaPepsi","ItemSodaPepsi","ItemSodaPepsi","ItemKiloHemp","ItemKiloHemp","ItemKiloHemp","ItemKiloHemp","ItemKiloHemp","ItemKiloHemp","ItemKiloHemp",""] ], Is it supposed to have
    ,""] at the end there?
  3. Like
    looter809 reacted to juandayz in [VERY BASIC GUIDE] TO MAKE A NEW SCRIPT   
    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
  4. Like
    looter809 got a reaction from juandayz in [RELEASE] XMAS TREE DEPLOYABLE 1.6   
    If you are like me and for some reason Infistar or the default BE scripts now have a block on creating all vehicles, you need to add these to your BE createvehicle.txt (if you get restriction #0 add it to line 2 ( first line after "//new") )
    !="MAP_t_picea1s" !="ASC_EU_BulbGRNB" !="ASC_EU_BulbREDB" 1="ASC_EU_BulbWHTB" !="ASC_EU_BulbYELB" !="ASC_EU_BulbBLUB" !="Land_Bag_EP1" !="Land_Sack_EP1" !="Land_Pillow_EP1" !="Suitcase" !="MAP_box_c" !="MAP_Sphere"  
    Edit: Also, in scripts.txt (for me it was) line 9 (Restriction #7)
    !="and_Bag_EP1\",\"Land_Sack_EP1\",\"Land_Pillow_EP1\",\"Suitcase\",\"MAP_box_c\",\"MAP_Sphere\",\"ASC_EU_BulbGRNB" !="and_Bag_EP1\",\"Land_Sack_EP1\",\"Land_Pillow_EP1\",\"Suitcase\",\"MAP_box_c\"] call BIS_fnc_selectRandom;\n\n_classname = \"MAP_Sphere\"; " !="and_Bag_EP1\",\"Land_Sack_EP1\",\"Land_Pillow_EP1\",\"Suitcase\",\"MAP_box_c\"] call BIS_fnc_selectRandom;\n\n_classname = _presents; "  
    Also, in createvehicle.txt (for me) line 16 (Restriction #14)
    !="Land_Pillow_EP1" !="Land_Sack_EP1" !="Land_Bag_EP1"  
    Merry Christmas!
  5. Like
    looter809 reacted to juandayz in Sensor (trigger) for a sound effect   
    yup, i not sure but i think playsound is only local.   so i guess only the player near of the snowman will listen the sound.
    for all players maybe u can try: 
    _nul = [objNull, player, rSAY, "snowsing",30] call RE;
     
  6. Like
    looter809 got a reaction from juandayz in Sensor (trigger) for a sound effect   
    The 
    [objNull,player,rSAY,"snowsing",30] call RE; did not work, however; the 
    playSound "snowsing"; did work. Thank you once again Juan!
  7. Like
    looter809 got a reaction from juandayz in [RELEASE] XMAS TREE DEPLOYABLE 1.6   
    Pretty sure I followed it correctly. I am getting this error in the client.rpt
    Error in expression <1; }; }; } else { player removeAction s_player_removexmas; s_player_removexmas> Error position: <s_player_removexmas; s_player_removexmas> Error Undefined variable in expression: s_player_removexmas File mpmissions\__CUR_MP.Chernarus\custom\fn_selfActions.sqf, line 1121 Edit: Also you do not need 
    workshop + portables+ in your custom variables unless you are using the portables and workshop script. Otherwise you will get errors in client rpt.
  8. Like
    looter809 got a reaction from juandayz in [RELEASE] XMAS TREE DEPLOYABLE 1.6   
    Great script! I love it.
    And if you use the Right Click Options by mudzereli you can add the
    class itemEtool { class xmas { text = "xmasTree"; script = "execVM 'custom\xmas\xmas.sqf'"; }; }; to it by just doing 
    ["ItemEtool","Deploy Xmas Tree","execVM 'custom\xmas\xmas.sqf';","true"], in the config.sqf of the click actions folder.
  9. Like
    looter809 reacted to juandayz in [RELEASE] XMAS TREE DEPLOYABLE 1.6   
    Fully Rewrited for this 2017 xmas. 
    MERRY XMAS EPOCH MOD!!!!!!
     
    1-Download from here: http://www.mediafire.com/file/6iax6nymsdnotva/xmas2017.rar
    2-Open your init.sqf 
    3-Open your custom variables.sqf
    4-Open fn_selfactions.sqf
    5-Open server_monitor.sqf
    6-Open Description.ext and into class sound add the xmas sound.. take a look in this example:
    7-INFISTAR
    8-BEFILTERS
     If u have some issues with battleyes open createvehicle.txt
     
  10. Like
    looter809 reacted to mudzereli in [Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing   
    I updated the main repository with this pull request (untested).
    THANK YOU @ebaydayz for updating this for everyone and releasing it.
    I see that there are new forum sections, not sure if this should be re-posted there now.
  11. Like
    looter809 reacted to icomrade in Epoch 1.0.6   
    I don't think one is necessarily better than the other, personally I prefer the gold system since there's nothing quite like killing someone and taking their gold, or raiding their base blocking their safes until they zero.
    The sqf framework is actually in the server sqf files. it's just down to fixing single currency glitches and updating how it loads and saves. https://github.com/EpochModTeam/DayZ-Epoch/search?p=2&q=Z_SingleCurrency&utf8=✓
  12. Like
    looter809 reacted to mudzereli in [Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing   
    Outdated, does not work with Epoch 1.0.7
    DEPLOYABLE BIKE 2.8.2
    all of this information is available in an easier-to-read format on github pages>>
    version 2.8.2 updates the code to work with Epoch Mod 1.0.6. Thanks @ebaydayz!
    version 2.8.1 should hopefully fix the long-standing non-moving-bike problem! Thanks @SchwEde!
    FYI: 2.8.0 adds the _condition and _ammo parameters to the config array so you will need to add a value for these parameter in each record of the DZE_DEPLOYABLES_CONFIG array in the appropriate spot if you are upgrading from 2.6
     
    Out of the box, it adds a deployable bike with a right click action on a toolbox and a couple other neat deployables.
    Really, it can be used to deploy just about anything. See the configuration section below.
    For some samples of what it can do, check out this gallery on imgur
     
    Installation
    download the files extract the addons and overwrites folder from the downloaded zip file into your mission file root find this line in your mission file init.sqf (warning: if you have a custom compiles file, find that line instead of the one below!) call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; place this line directly after the line you found call compile preprocessFileLineNumbers "addons\bike\init.sqf"; edit addons\bike\config.sqf to change some options or add different deployables (see configuration section for more info) Warning:
    due to the way the way arma handles numbers and the way addon is coded, using the save-to-database option may not allow you to re-pack some objects if you have Character ID's over 500,000 (which I don't think will be an issue for 99.99% of people).  
    Adding Your Own Custom Actions
    If you use another right click method like extra_rc.hpp and want to switch to my method, see my click actions configuration github page.
    The click actions script is included in the deploy script as part of the core, so you don't need to download anything, just follow the instructions for adding your own actions.
    * note: before attempting to troubleshoot issues with adding your own actions, make sure you are using the most recent version of the addon.
     
    Configuration
    This addon is highly configurable, you can deploy just about anything, not just bikes.
    open addons\bike\config.sqf and edit the array to add your own deployables.
     
    DZE_DEPLOYABLES_CONFIG format -- (note no comma after last array entry)
    DZE_DEPLOYABLES_CONFIG = [ [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_hive,_plot,_simulation,_deployables,_near,_parts], [_clickItem,_deployOffset,_packDistance,_damageLimit,_packAny,_cargo,_hive,_plot,_simulation,_deployables,_near,_parts], [...more stuff here...] ]; DZE_DEPLOYABLES_CONFIG array values (view on github to read easier):
    parameter | description | type | example --------------|---------------------------------------------------------------------|--------|-------- _clickItem | class name of the item to click on | string | "ItemToolbox" _deployOffset | [_side,_front,_up] array to offset the deployable when buiding | array | [0,2,1] _packDistance | how close does the packer need to be to pack the object? | number | 5 _damageLimit | item can't be repacked if damage is > this. (-1 = no re-packing) | number | 0.1 _packAny | can anyone repack the deployable? | bool | false _cargo | clear the cargo of the deployable? | bool | false _ammo | should vehicle ammo be cleared? (does not persist through restart) | bool | true _hive | write deployable to database? | bool | false _plot | require a plot from the owner to build the deployable? | bool | false _simulation | enable simulation (movement/damage) for the object? (true for cars) | bool | true _road | enable road building for this object? | bool | true _deployables | array of class names that can be deployed with this method | array | ["MMT_Civ"] _near | array of items required nearby to build (workshop/fire/fueltank) | array | [] _parts | array of parts required to build (will be taken from player) | array | ["ItemToolbox"] _condition | string of code to evaluate to determine whether action is shown | string | "!(isNull player) && {(getPlayerUID player) in DZE_DEPLOYABLE_ADMINS}" DZE_DEPLOYABLE_NAME_MAP array -- allows you to rename the deployable (on the right click/messages)
    format (note no comma after last array entry)
    DZE_DEPLOYABLE_NAME_MAP = [ [_class,_name], [_class,_name], [... more ...] ];  array parameters
    parameter    | description                                                         |  type  | example --------------|---------------------------------------------------------------------|--------|-------- _class        | class name of the item you want to replace the name of              | string | "Notebook" _name         | new name to display when right clicking                             | string | "Macbook Pro" Change Log
    version | change --------|------- 2.8.2 | updates for 1.0.6! Thanks @ebaydayz! 2.8.1 | fix from SchwEde that should fix bike not moving. Thanks @SchwEde! 2.8.0 | option to clear vehicle ammo 2.7.1 | better exit reasons 2.7.0 | option to add condition for showing action in config 2.6.1 | fix for unrideable bikes 2.6.0 | road building options, deployable name mapping 2.5.1  | fix a bug where preview items would sometimes disappear  2.5.0  | now uses a modified epoch building system to deploy the objects  2.4.3  | better click actions build conflict detection  2.4.2  | updated for new click actions handler build  2.4.1  | fixed deployables spawning in locked after restart  2.4.0  | multi-part deployables. yay!  2.3.1  | big fix on packing temp objects  2.3.0  | optional saving to database with post-restart memory of deployed items (see warning below about this) | configurable damage limits on re-packing | admin list for packing/deploying instantly & being able to remove all deployables  2.2.1  | positioning fix for deployed items  2.2.0  | option for clearing cargo of spawned items  2.1.0  | change way dependency call is made, only one line needed in init.sqf now for setup  2.0.0  | major update, allow multiple deployables, pretty much any class  1.1.0  | configuration options / code optimization  1.0.0  | release Issues/FAQ
    1) people are getting kicked for createvehicle restriction when building a stone wall
    open your battleye filter createvehicle.txt and change this line
    5 "Fort_" !="Fort_RazorWire" !="Fort_RazorWirePreview" to this:
    5 "Fort_" !="Fort_RazorWire" !="Fort_RazorWirePreview" != "Fort_StoneWall_EP1" 2) I am using "A Plot For Life" and this is not working!
  13. Like
    looter809 reacted to Shawn in [RESOURCE] A collection of Anti-Dupes   
    Block ESC Menu if gear was just/is accessed + Black screen if gear is accessed and fps is dropped
    For this method, all credit goes to JustBullet!

    What it does: Blocks the escape menu for 30 seconds after opening your inventory, but also displays a black screen if a player enters his inventory, and reduces his/her fps to less than or equal to 4. 
    Start by opening up dayz_spaceInterrupt.sqf and find this:
    // esc if (_dikCode == 0x01) then { DZE_cancelBuilding = true; call dayz_EjectPlayer; }; Above it, add the following:
    /* Anti-Duping by JustBullet */ if (_dikCode in actionKeys "Gear") then { _nill = execvm "path\to\esc-dupe.sqf"; }; Then create an sqf file in the desired location called esc-dupe.sqf, and inside, add:
    ///////////////////////////////////////////////////// //////////////* Author by JustBullet */////////////// ///////////* BLOCK ESC MENU ver. 1.0.3 *///////////// ///////////////////////////////////////////////////// if (isNil "JustBlock") then { private ["_timer","_fps"]; JustBlock = true; disableSerialization; waituntil{!isnull (finddisplay 46)}; _timer = 30; _trigger = false; while {_timer > 0} do { _timer = _timer - 0.1; if !(isnull (finddisplay 49)) then { findDisplay 106 closeDisplay 1; finddisplay 49 closeDisplay 2; _fps = round(diag_fps); switch true do { case (!(_trigger) && (_fps <= 4)): {_trigger = true; disableUserInput true;}; case ((_trigger) && (_fps > 4)): {endLoadingScreen; _trigger = false; disableUserInput false;}; }; if (_trigger) then {startLoadingScreen ["Very low FPS, you are blocked...", "DayZ_loadingScreen"];} else {systemchat format["Cannot exit game 30 seconds after accessing your inventory.", round(_timer)];}; }; uiSleep 0.1; }; if (_trigger) then {endLoadingScreen; disableUserInput false;}; JustBlock = nil; }; *******************************************
    Block duping via skin change
    The goal of this method is to create a blacked screen for a player when he changes clothes. Of course, this won't be noticed, but those that decrease their fps, they are blacked out, and messaged with: "Anti Dupe: Changing clothes".
    Open up player_switchModel.sqf and paste the following at the very top:
    disableUserInput true; startLoadingScreen ["Anti Dupe: Changing clothes", "DayZ_loadingScreen"]; And at the very bottom, paste the following:
    endLoadingScreen; disableUserInput false; The disableUserInput is included to prevent those that have memorized the required spots to click to dupe with.
    *******************************************
    Prevent skin change if backpack is worn
    The following addition is to block skin changing when a backpack is worn.
    Find your player_wearClothes.sqf, and replace:
    if (!isNull (unitBackpack player)) exitWith { DZE_ActionInProgress = false; cutText [(localize "STR_EPOCH_ACTIONS_9"), "PLAIN DOWN"] }; With the following:
    if (!isNull (unitBackpack player)) exitWith { DZE_ActionInProgress = false; cutText [("Please drop your backpack to change clothing"), "PLAIN DOWN"] }; *******************************************
    Prevent packing of safe with player/zombie nearby
    What this does is prevents a player from packing a safe if a player or zombie is within 15 meters.
    Simply open up player_packVault.sqf and find:
    if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_15") , "PLAIN DOWN"]; }; Right after this, paste the following:
    _countplayers = count nearestObjects [player, ["CAManBase"], 15]; if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a player or zombie is within 15 metres!"], "PLAIN DOWN"]; }; *******************************************
    Check wallet dupe
    What this does is, instead of checking the wallet of an ai/player when their coins are at "0", which would cause your _cashMoney becoming scalar, it instead exits with a pleasant message :)
    In fn_selfAction.sqf, find this:
    if (_isMan && !_isZombie && !_isAnimal) then { _player_studybody = true; } And replace that block of code with:
    if (_isMan && !_isZombie && !_isAnimal && _ownerID != "0") then { _player_studybody = true; } IMPORTANT! If you are using plot for life, change this:
    _ownerID != "0" to this:
    _characterID != "0" And replace your check_wallet.sqf with:
    private ["_body", "_hisMoney", "_myMoney", "_killsH", "_test2", "_headShots", "_test","_playeridke","_humanity"]; _body = _this select 3; _hisMoney = _body getVariable ["cashMoney",0]; if(_hisMoney < 1) exitWith { cutText ["This is one poor MOTHERFUCKER!", "PLAIN DOWN"]; }; _PlayerNear = _body call dze_isnearest_player; if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]}; _name = _body getVariable ["bodyName","unknown"]; _hisMoney = _body getVariable ["cashMoney",0]; _myMoney = player getVariable ["cashMoney",0]; _myMoney = _myMoney + _hisMoney; _body setVariable ["cashMoney", 0 , true]; player setVariable ["cashMoney", _myMoney , true]; systemChat format ['You took %1 coins, ID says %2 !',_hisMoney,_name]; sleep 2; _cid = player getVariable ["CharacterID","0"]; _cashMoney = player getVariable ["cashMoney",0]; if(_cashMoney > 0) then{ } else { _cashMoney = 0; }; *******************************************
    Give Money dupe fix
    First, find your bank_dialog.sqf, and replace everything in there with:
    if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_10") , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; private ["_dialog"]; _dialog = createdialog "BankDialog"; call BankDialogUpdateAmounts; player setVariable ["tradingmoney", true, true]; DZE_ActionInProgress = false; waitUntil {uiSleep 1; !dialog}; player setVariable ["tradingmoney", false, true]; Then go to your init.sqf for your coin system, and find:
    GivePlayerAmount = { private ["_amount","_target","_wealth"]; _amount = parseNumber (_this select 0); _target = cursorTarget; _wealth = player getVariable["cashMoney",0]; _twealth = _target getVariable["cashMoney",0]; _InTrd = _target getVariable ["TrBsy",false]; _isMan = _target isKindOf "Man"; if (_amount < 1 or _amount > _wealth) exitWith { cutText ["You can not give more than you currently have.", "PLAIN DOWN"]; }; if (!_isMan) exitWith { cutText ["You are not facing anyone.", "PLAIN DOWN"]; }; if (_wealth == _twealth) exitWith { cutText ["FAILED : Both Targets have same amount of money.", "PLAIN DOWN"]; }; if (_InTrd) exitWith { cutText ["Other Player is busy, please wait.", "PLAIN DOWN"]; }; Replace it with:
    GivePlayerAmount = { private ["_amount","_target","_wealth"]; _amount = parseNumber (_this select 0); _target = cursorTarget; _wealth = player getVariable["cashMoney",0]; _twealth = _target getVariable["cashMoney",0]; _isMan = _target isKindOf "Man"; if (_target getVariable ["tradingmoney", false]) exitWith { cutText ["You can not give to someone who is already trading.", "PLAIN DOWN"]; }; if (_amount < 1 or _amount > _wealth) exitWith { cutText ["You can not give more than you currently have.", "PLAIN DOWN"]; }; if (!_isMan) exitWith { cutText ["You are not looking correctly at a player", "PLAIN DOWN"]; }; Finally, replace your give_player_dialog.sqf with:
    private ["_dialog"]; GivePlayerTarget = _this select 3; if (GivePlayerTarget getVariable ["tradingmoney", false]) exitWith { cutText ["You can not give to someone who is already trading.", "PLAIN DOWN"]; }; _dialog = createdialog "GivePlayerDialog"; call GivePlayerDialogAmounts; player setVariable ["tradingmoney", true, true]; [] spawn { while {dialog} do { if (GivePlayerTarget getVariable ["tradingmoney", false]) exitWith { closeDialog 0; }; uiSleep 0.25; }; }; waitUntil {uiSleep 1; !dialog}; player setVariable ["tradingmoney", false, true]; *******************************************
    An important tip I recommend to anyone is, prevent any form of "punishment" which kicks players to the lobby, such as speaking in side chat, x amount of wrong codes for guessing a door code. These can all be easily used for duping. The well known anti hack which I won't name has a lot of kicks to lobby which can be triggered by players. This involves typing anything in chat from the _veryBadTexts array. As a result, the notorious backpack dupe can be achieved. As I mentioned, simply fix this issue by adding:   
    player setDamage 5; Along with a message as to why they were killed:
    systemChat 'You were killed to prevent hacking and duping!'; To the block of code that executes the kick.
    I won't state every single block that requires this added, as there are quite a lot, but it is very simple once you know what to look for.
    *******************************************
    If anyone has more ways of preventing duping, please feel free of commenting the fixes below. I can test it out and happily add it to the collection.
    Please remember that all credit goes to the rightful creators of the scripts.
    Thanks.
  14. Like
    looter809 got a reaction from BigEgg in [Release] 2.1 Plot Management - UPDATED Object Counter   
    Definitely should. I also see your Restrict Building script which I may have to look into. Looks very useful. Thanks for everything.
  15. Like
    looter809 got a reaction from BigEgg in [Release] 2.1 Plot Management - UPDATED Object Counter   
    @BigEgg It worked. Thank you so much. So many players forget to add themselves to the plot pole and Plot 4 Life never worked when I tried to install it. And with Epoch 1.0.6 coming around the corner, I don't really want to try again any time soon.
  16. Like
    looter809 reacted to FreakingFred in [FIX] Automatically Eject Players From Blown Up Vehicles   
    We have ran into the following two issues regarding blown up vehicles on our server:
    Players get stuck in blown up vehicles, and are actually unable to eject. Players refuse to eject from a blown up vehicle, as a way to avoid combat. These are the steps I took to fix this issue:
    Navigate to dayz_server\compile. Open server_updateObject.sqf with your text editor of choice. CTRL+F and search for the following: _object_killed = { private["_hitpoints","_array","_hit","_selection","_key","_damage"];  
    Under that, copy and paste the following: if((count crew _object) > 0) then{ { moveOut _x } forEach crew _object; };  
    Save and done.  
    This has been tested a decent amount over the past few restarts on my server, and has been reported to be working by the players.  The only small issue we have found, is that when it gets close to a server restart, and there are 60-70 players online, it can sometimes take up to 20-30 seconds to eject the player(s).  If anyone has any suggestions on how to do this better, then please feel free to share.  Hopefully, this helps a few people.  Enjoy!
  17. Like
    looter809 reacted to maca134 in Ingame Camera with Monitor control   
    This is what i managed to knock up today.
     

  18. Like
    looter809 reacted to Logi in [Release] Vehicle locator and key identifier   
    Does your AH.sqf file contain this line:
    if (isNil 'vehicles') then {vehicles = [];} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};
     
    If so, change it to this and it should work:
    if (isNil 'vehicles') then {vehicles = vehicles;} else {if (typeName vehicles != 'ARRAY') then {vehicles = [];YOLO = true;};};
  19. Like
    looter809 reacted to Nox in SQL Clean Up   
    Hello
     
    Go to Navicat or something like that
     
    Create a FUNCTION and make it like this
     
    BEGIN DELETE FROM character_data WHERE Alive = 0; DELETE FROM object_data WHERE Damage = 1; UPDATE traders_data SET qty = 10 WHERE qty = 0; END With this,
    Clean all Dead Player
    Clean All Destroyed Vehicles
    Restore 10 Items to Trader who have 0 in Stock.
     
    then After you need to call it with Batch
     
    Create a Bat file and write this
    echo Cleaning Server Database cd\ cd C:\Program Files\MySQL\MySQL Server 5.6\bin\ mysql.exe -u YOURUSER -pYOURPASS dayz-epoch --execute="call NAMEOFFUNCTION()" Enjoy
  20. Like
    looter809 reacted in [How To] Setup A DayZ Epoch server (out of date) being revised!   
    After reading a couple of guides on setting up a DayZ Server for people to play on I have noticed that many tutorials have missing information or the user is left with different error messages to deal with or ignore.
     
    The following tutorial is based on my knowledge, trial and error, debugging and contact with different users on the issue. I hope to provide the most detailed, and easy-to-follow tutorial on the web.
     
    [Files Required]  
    Steam. http://store.steampowered.com/about/ Arma 2 (Look at "Creating your server" section.) Arma 2 : Operation Arrowhead (Look at "Creating your server" section.) DayZ Commander, http://www.dayzcommander.com/ Visual C++ Redistributable Packages for Visual Studio 2013, http://www.microsoft.com/en-us/download/details.aspx?id=40784 (x86 is for 32 Bit.) Visual C++ Redistributable Packages for Visual Studio 2010, http://www.microsoft.com/en-us/download/details.aspx?id=5555 WAMP / XAMPP, http://www.wampserver.com/en/ or https://www.apachefriends.org/download.html (XAMPP for this tutorial) HeidySQL, http://www.heidisql.com/download.php (I recomend getting the installer) uTorrent, http://www.utorrent.com/ DayZ Epoch Client Files, http://goo.gl/IN1Pt1 (Taken From http://epochmod.com/a2dayzepoch.php) DayZ Epoch Server Files, http://goo.gl/3GyZ0P (Taken From http://epochmod.com/a2dayzepoch.php) WinRar, http://www.rarlabs.com/download.htm Notepad++, http://notepad-plus-plus.org/ (Optional) Download this package made by Rotzloch https://mega.co.nz/#!uc9E0SgK!pZxZflTVTSs2jgYuBM6tUmBsYksAC4DtUeitSgmRfTU
     
    [Prerequisites]
    A Computer with atleast 2GB Ram for a smooth experience for about 24 players. (4GB for around 60 players.) Harddrive of atleast 25GB for the game files. A Good connection (40Mbit Upload / Download) Atleast a Two-Core CPU. [Creating your server]
     
    If you have any of the games installed previously, I would recommend deleting them to not face any problems in the future.
    Install the C++ Redistributable Packages and restart your computer/box. (I recommend to install both x64 and x86 if you have a 64bit Operating system. Create a folder, preferably on your Desktop called "Dayz Epoch Server". Launch steam, login. Download Arma 2. Download Arma 2 : Operation Arrowhead. Wait until they are complete. Launch Arma 2 in windowed mode, wait until you are at the main menu, then close the game. Do the same for Arma 2 : Operation Arrowhead. Launch DayZ Commander. Click "install/update" in the top right of the window. Install the Arma 2 Beta Patch http://i.imgur.com/RwNq8ti.png Wait until that is complete. Now, go to your Steam Folder. Usually C:\Program Files (x86)\Steam\SteamApps\common\ Copy everything from inside your "Arma 2" Folder inside the "DayZ Epoch Server" folder we created on your desktop in Step 1. Do the same for your "Arma 2 Operation Arrowhead" Folder EXCEPT any folders starting with an @. Click "Yes" to any popups asking you to overwrite the files. Take a deep breath. The easy part is now done. Take the Epoch Client and Server files that you downloaded earlier and put them on your Desktop. Open them up with WinRar http://i.imgur.com/g48k2s5.png Copy "@DayZ_Epoch" from the Client files into "DayZ Epoch Server" on your Desktop. Copy "@DayZ_Epoch_Server" from the Server files into "DayZ Epoch Server" on your Desktop. Copy the "Keys" folder from the Server files into "DayZ Epoch Server". Open the "Battleye" folder inside the Server files and copy everything inside into the "BattlEye" folder inside the "DayZ Epoch Server folder" on your Desktop. (Note the difference in Capitalization.) Copy all the 4 ".dll" files from your Server files into the "Dayz Epoch Server" folder. http://i.imgur.com/vzYLZ4v.png Open up "MPMissions" from your Server files and find the mission that you want. I will be using "DayZ_Epoch_11.Chernarus" for this tutorial. Copy that to your "MPMissions" folder inside the "Dayz Epoch Server" folder that is on your Desktop. Open "Config-Examples" from your Server files, then copy the matching instance number as your Mission to your "Dayz Epoch Server" folder. We will use "instance_11_Charnarus". Copy "DayZ_Epoch_instance_11_Chernarus.bat" from that same folder into the "Dayz Epoch Server" on your Desktop. Setup and install XAMPP, then make sure mysql and apache are started. Click the "Admin" button next to MySQL in the XAMPP control panel. Once the phpMyAdmin page is loaded, at the top, click "Users". Under the Users overview, click Add user. Enter "Epoch_User" as the User name. (without the "" ). As the Host, select "Local" from the dropdown box. Enter a password. I will use "password123" but please make sure to use something more secure. Scroll down and click "Check All" from the Global privileges then remove ALL Administration privileges like GRANT and SUPER. At the bottom, click Go on the right. Now you have your user created. Click "Databases" at the top. Under Create database, type in "Epoch_Database" as the Database name then click Create. Now you have your database. You can go ahead and stop Apache from the XAMPP control panel, you dont need it enabled anymore. Inside your Server files, open up the SQL folder and copy "epoch.sql" to your Desktop. Open HeidySQL. As the session name in the top left, we will have it just named as "DayZ Server SQL" Hostname / IP should be "127.0.0.1". User should be "Epoch_User" Password is "password123" or whatever you specified in your user setup. Click "Save" at the bottom left. then click Open. On the left hand side, you should see "Epoch_Database" go ahead and double click it. It should say "Database: Epoch_Database" at the middle tab on top. Click the "Query" tab. You should be presented with a text box, just drag your "epoch.sql" from your desktop into that textbox. Click the blue Play button above the Query tab or press F9. It should start executing the SQL into your database. You might get a "3 Warnings" popup at the end, ignore that. Restart HeidySQL and double click your database on the left, you should see some tables created. http://i.imgur.com/xBknVUv.png Close HeidySQL. Take another deep breath. The hard part is now done, you are nearly finished with your server! Go to your desktop and open your DayZ Epoch Server folder. It should look something like this. http://i.imgur.com/CHeOg9o.png Open up your instance_11_Chernarus folder. Open "config.cfg" with Notepad++. Edit this file to your liking, and set a "passwordAdmin" value for you to be able to login as an admin from ingame. Add requiredSecureId = 2; under BattlEye = 1; This is to prevent the UID spoofing. At the bottom, change your difficulty="veteran"; to difficulty="regular"; Save and close. Open up "HiveExt.ini" with Notepad++. Scroll down to the [Database] section. Make sure Host = 127.0.0.1 Same with Database = Epoch_Database The same with Username = Epoch_User And finally, Password = password123 Save and close. Run DayZ_Epoch_instance_11_Chernarus.bat to start your server. (Optional) Open up "cmd" from your start menu and type ipconfig to get your server's ip. Put that into DayZ Commander as a favorite so you can connect easily.
    (Note) If your MySQL hosting is provided by your host, you can skip the MySQL setup part and not download XAMPP / Wamp and just use that info from your host.
    (Linux Note) If you are running a linux machine, and running Wine to allow you to run windows applications, please put "msvcp120.dll" & "msvcr120.dll" into your "DayZ Epoch Server" folder. A simple google search should help you find those two files. <Credits to Flodding for reminding me about this.>
    (NEW) Created an Auto-Restarter.
     
    I hope that my tutorial has covered any questions you may have, and good luck with all your servers!
  21. Like
    looter809 reacted to HollowAddiction in [Release] Hollow's Chernarus Caves (Prud)   
    Hollow's Caves Prud
    http://www.CraftDoge.com 
     

     
    This is Third in a series of Caves in Chernarus, I am adding them one by one so you can chose the ones you like and add them individually, i have left them bare so they can be customized. Included in the download is the mission and biedi. As always, use it as you wish.
     
    Cave Series:
    Caves North: 
    Caves South: 
    Caves Prud:
     
    Video:
    https://www.youtube.com/watch?v=nz2W5JBvetw&feature=youtu.be
     
    Screenshots:
    http://imgur.com/a/l93rq#0
     
    Download:
    http://www.craftdoge.com/downloads/
     
    Tutorial:
     
    click the download link above and download the Prud_Cave.zip
     
    Unpack your dayz_server.pbo
     
    Add the following code to the bottom of your server_functions.sqf  located at: 
    dayz_server\init\server_functions.sqf
    [] ExecVM "\z\addons\dayz_server\custom\Prud_Cave.sqf"; Create a folder named "custom"(if you dont have one) and place the Prud_Cave.sqf
    you downloaded, inside the custom folder.
     
    Place the custom folder in the root of your dayz_server.pbo then repack and upload your pbo.
     
    I haven't included a map marker in this build.
  22. Like
    looter809 reacted to mudzereli in [release] 1.0.5.1 - Safe Suicide 1.2.2 - Kill yourself in style.   
    SUICIDE 1.2.2
     
    Out of the box, this script adds a right click action to most pistols in the game that allows you to commit suicide.
    It's configurable, triggered from right click instead of scroll menu, and it plays randomly one of 2 animations
     
    For some samples of what it does, check out this gallery on imgur:
     
    Features:
    fully configurable right click so no accidental suicides cancel suicide by moving/etc better visual/audio cues Installation
    download the files extract the addons and overwrites folder from the downloaded zip file into your mission file root add this line to the end of your mission file init.sqf. call compile preprocessFileLineNumbers "addons\suicide\init.sqf"; edit addons\suicide\config.sqf to configure some options such as what guns it works with etc. Change Log
    version|change -------|------- 1.2.2  | better click actions build conflict detection 1.2.1  | update for compatibility w/ new click actions build 1.2.0  | now you can suicide without having the handgun equipped. option to enable or disable actual weapon use (selection / firing) 1.1.0  | better message handling when cancel time is 0 (instant suicide) / change default cancel time to 0 1.0.0  | release
  23. Like
    looter809 reacted to Halvhjearne in Delete vehicles parked in safezones on restart   
    A guy on opendayz.net gave me this brilliant idea for a script, big thanks to titan!
     
    IMPORTANT:
    This can delete vehicles completely from the database!
    beware that if not set correctly you can end up deleteing vehicles un-intended, wich is mainly the reason why i made a log of vehicle type,pos,cargo and so on when it is triggered
     
    HOWEVER i can not stress this enough, backup, backup, backup ... before you use this!!!
     
    after that warning, heres what i did ...
     
    in server_monitor.sqf find this:
    // total each vehicle serverVehicleCounter set [count serverVehicleCounter,_type]; }; add the line like this:
    serverVehicleCounter set [count serverVehicleCounter,_type]; }; [_object] execVM "\z\addons\dayz_server\compile\Server_DeleteObjInsafezone.sqf"; now make a text file and call it server_deleteObjInsafezone.sqf and add this code:
    /* VEHICLE CLEANUP ZONE Script by HALV */ _obj = _this select 0; if (!isServer) exitWith {diag_log "Server_DeleteObjInsafezone.sqf - ERROR: NOT SERVER?"}; //\\\\\\\\\\\\\\\\\\\\ Setup Area ////////////////////\\ //vehicle types to Check for _delVeh = ["Air","Landvehicle","Ship","Tank"]; //Action to take when vehicle is detected in a [VEHICLE CLEANUP ZONE] //0 Delete vehicles ingame but keep in database. NOTE: This will stack vehicles in database if not cleaned propper //1 Tp vehicles outside [VEHICLE CLEANUP ZONE] ("radius" + 50 meter to 4x "radius" from VEHICLE CLEANUP ZONE pos eg: if radius is 100 vehicles are moved 150-400 meter away) //2 Tp vehicles to a position within 125m of _safespot (remember to set a position below) //3 will delete vehicles completly from database _Action = 1; //if _Action = 2 then enter the position you desire here (default is by grozovoy pass around 022010) _safespot = [2283.19,14255,0]; //how large radius to spread them in this area in meters (default 125m) _radius = 125; //damaged above this amoun, vehicle is deleted (set to 1 to only delete completely destroyed vehicles) _dam = 0.90; //if true will delete vehicles matching array below by default _delbikmot = true; //if above is true will delete these by default _defdelar = ["Bicycle","Motorcycle","CSJ_GyroC","CSJ_GyroCover","CSJ_GyroP"];//,"ATV_Base_EP1" //set to true, to unlock vehicles by default when TP'ed _unlock = true; //log text, this is what you want to look for in the logs, if you need to know something about a moved vehicle _txt = "[VEHICLE CLEANUP ZONE]"; //Update vehicles to the hive, and make sure they are not moved each restart? _updateHIVE = true; //VEHICLE CLEANUP ZONE's/areas switch choosing the map name for cleanup location purposes if(isNil "HALV_VEHICLE_CLEANUPZONES")then{ diag_log format["%1: selecting world to cleanup ...",_txt]; _WorldName = toLower format ["%1", worldName]; switch (_WorldName)do { //NAPF case "napf":{ // diag_log format["%2: Cleanup zones for napf selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[8246.3184,15485.867,0], 125, "Trader City Lenzburg"], [[15506.952,13229.368,0], 125, "Trader city Emmen"], [[12399.751,5074.5273,0], 125, "Trader City Schratten"], [[10398.626,8279.4619,0], 125, "Bandit Vendor"], [[5149.9814,4864.1191,0], 125, "Hero Vendor"], [[2122.7954,7807.9878,0], 100, "West Wholesaler"], [[5379.0342,16103.187,0], 100, "North Wholesaler"], [[6772.8877,16983.27,0], 100, "Nordic Boats"], [[16839.973,5264.0566,0], 100, "Pauls Boats"], [[15128.379,16421.879,0], 100, "AWOLs Airfield"] ]; }; //chernarus case "chernarus":{ // diag_log format["%2: Cleanup zones for chernarus selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position radius cityname/text [[6325.6772,7807.7412,0], 125, "Trader City Stary"], [[4063.4226,11664.19,0], 125, "Trader City Bash"], [[11447.472,11364.504,0], 125, "Trader City Klen"], [[1606.6443,7803.5156,0], 125, "Bandit Camp"], [[12944.227,12766.889,0], 125, "Hero Camp"], [[13441.16,5429.3013,0], 100, "Wholesaler East"], [[4510.7773,10774.518,0], 100, "Aircraft Dealer"], [[7989.3354,2900.9946,0], 100, "Boat Dealer South"], [[13532.614,6355.9497,0], 100, "Boat Dealer East"], [[4361.4937,2259.9526,0], 100, "Wholesaler South"] ]; }; //tavi case "tavi":{ // diag_log format["%2: Cleanup zones for tavi selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[11698.81,15210.121,0], 75, "Trader City Lyepestok"], [[15309.663,9278.4912,0], 75, "Trader City Sabina"], [[5538.7354,8762.2695,0], 75, "Trader City Bilgrad"], [[7376.6084,4296.5879,0], 75, "Trader City Branibor"], [[10948.426,654.90265,0], 75, "Bandit Vendor"], [[15587.822,16394.049,0], 75, "Hero Vendor"], [[16555.732,10159.68,0], 75, "Aircraft Dealer"], [[6815.0776,8534.1504,0], 75, "Aircraft Dealer 2"], [[4066.3528,7265.0024,0], 75, "Misc. Vendor"], [[17497.631,7159.0879,0], 75, "Misc. Vendor 2"], [[17332.115,12930.239,0], 75, "Boat Dealer"], [[10570.494,16772.477,0], 75, "Boat Dealer 2"], [[10698.463,5983.665,0], 75, "Boat Dealer 3"], [[5419.2437,9503.5479,0], 75, "Boat Dealer 4"], [[13342.758,8611.9932,0], 75, "Wholesaler"], [[9859.4209,7471.5684,0], 75, "Wholesaler"] // <-- no comma for last entry ]; }; /* //myworldname case "myworldnameinlowercase":{ // diag_log format["%2: Cleanup zones for myworldnameinlowercase selected! (check: %1)",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[7839.60,8414.73,381.33], 150, "my custom zone marker"], [[7839.60,8414.73,381.33], 75, "my custom location"] // <-- no comma for last entry ]; }; */ //default default{ diag_log format["%2: Cleanup zones for %1 not availible ...",_WorldName,_txt]; //logging if right worldname was selected, if uncommented HALV_VEHICLE_CLEANUPZONES = [ //position //radius //cityname/text [[0,0,0], 1, "DEBUG"] ]; }; }; }; //\\\\\\\\\\\\\\\\\\\\ End Setup Area ////////////////////\\ /////////////// dont touch anything below this line unless you know what you are doing \\\\\\\\\\\\\\\ _possiblematch = false; {if(_obj isKindOf _x)then{_possiblematch=true;};}forEach _delVeh; if(_possiblematch)then{ { _Spos = _x select 0; _Rad = _x select 1; _name = _x select 2; _radats = _Rad+50; _radx4 = _Rad+_Rad+_Rad+_Rad; if(_obj distance _Spos < _Rad)then{ _defdel = false; _typeOf = typeOf _obj; _pos = getpos _obj; _mags = getmagazinecargo _obj; _weaps = getweaponcargo _obj; _packs = getbackpackcargo _obj; _objID = _obj getVariable["ObjectID","0"]; _objUID = _obj getVariable["ObjectUID","0"]; _objname = (gettext (configFile >> 'CfgVehicles' >> _typeOf >> 'displayName')); diag_log format["%1: %2 (%3) by %4 @%5 %6 [ID:%7,UID:%8] Cargo: [%9,%10,%11]",_txt,_typeOf,_objname,_name,mapgridposition _pos,_pos,_objID,_objUID,_weaps,_mags,_packs]; if(_delbikmot)then{{if(_obj isKindOf _x)then{_defdel = true};}forEach _defdelar;}; if(_defdel)then{_Action=3;diag_log format["%2: %1 is Model to delete by default!",_typeOf,_txt];}; if(getDammage _obj > _dam)then{_Action=3;diag_log format["%2: %1 too damaged",_typeOf,_txt];}; if(_unlock and !_defdel and (locked _obj))then{_obj setVehicleLock "UNLOCKED";_obj setVariable ["R3F_LOG_disabled",false,true];diag_log format["%2: %1 Un-Locked",_typeOf,_txt];}; switch(_Action)do{ case 0:{deleteVehicle _obj;diag_log format["%2: %1 Deleted, but remains in DB (Dont forget to clean this up)",_typeOf,_txt];}; case 1:{ _newPos = [_Spos, _radats, _radx4, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _obj setpos _newPos; //update to HIVE? if(_updateHIVE)then{ private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _obj; _worldspace = [ round(direction _obj), _position ]; _fuel = fuel _obj; _key = format["CHILD:305:%1:%2:%3:",_objID,_worldspace,_fuel]; diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; diag_log format["%6: %5 TP from %1 %2 to %3 %4",_pos,mapgridposition _pos,_newPos,mapgridposition _newPos,_typeOf,_txt]; }; case 2:{ _newPos = [_safespot, 0, _radius, 10, 0, 2000, 0] call BIS_fnc_findSafePos; _obj setpos _newPos; //update to HIVE? if(_updateHIVE)then{ private["_position","_worldspace","_fuel","_key"]; _position = getPosATL _obj; _worldspace = [ round(direction _obj), _position ]; _fuel = fuel _obj; _key = format["CHILD:305:%1:%2:%3:",_objID,_worldspace,_fuel]; diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; }; diag_log format["%6: %5 TP from %1 %2 to %3 %4",_pos,mapgridposition _pos,_newPos,mapgridposition _newPos,_typeOf,_txt]; }; default{_msg = format["%2: %1",_typeOf,_txt];deleteVehicle _obj;[_objID,_objUID,_msg] call server_deleteObj;}; }; }; }forEach HALV_VEHICLE_CLEANUPZONES; }; script can do quite a few options now:
     
    Delete (not from database, will still require cleanup or it will clonk up db at some point)
    Delete (als from database)
    TP outside safezone TP to "safe" location   you can edit what to delete, areas, distance to areas
    can be set to always delete certain vehicles (like bikes/motorcycle/ATV) by default
    can be set to delete damaged vehicles by default
    can be set to unlock vehicles when moved
     
    will work out of the box on chernarus, napf and taviana
     
    i tried to comment for easy edit
     
    after your edits, put this file in the complie folder of your server pbo and restart server.
     
    all vehicles in safezones when server restarts are now only a small notice in the rpt file with info on city name, where it came from, type, current position and cargo [weapons,mags,bags].
     
     
    enjoy ;)
  24. Like
    looter809 reacted to LoadingSA in Base Decay Question   
    I've added the following so far and removed CPC base god mode
     
    DZE_GodModeBase = true;
    DZE_maintainRange = 100;
    DZE_requireplot = 0; //cahnges requirements for plot polls
    DZE_PlotPole = [100,100];
     
    I will make an event on the DB server for
    CREATE EVENT setDamageOnAgeMaintain ON SCHEDULE EVERY 5 DAY DO UPDATE `object_data` SET `Damage`=0.11 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 14 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') ) ; So this should make it so that players will get a 100m area maintained with the plot pole and that plot poles have a 100M area around and a 100m are above correct?
     
     
    edit:
     
    I moved the maintain_area.sqf to my mission folder (custom\playerbuild) and then called the path in fn_selfactions would I then just need to remove this block of code?
    _requirements = []; switch true do { case (_count <= 10): {_requirements = [["ItemGoldBar10oz",1]]}; case (_count <= 20): {_requirements = [["ItemGoldBar10oz",2]]}; case (_count <= 35): {_requirements = [["ItemGoldBar10oz",3]]}; case (_count <= 50): {_requirements = [["ItemGoldBar10oz",4]]}; case (_count <= 75): {_requirements = [["ItemGoldBar10oz",6]]}; case (_count <= 100): {_requirements = [["ItemBriefcase100oz",1]]}; case (_count <= 175): {_requirements = [["ItemBriefcase100oz",2]]}; case (_count <= 250): {_requirements = [["ItemBriefcase100oz",3]]}; case (_count <= 325): {_requirements = [["ItemBriefcase100oz",4]]}; case (_count <= 400): {_requirements = [["ItemBriefcase100oz",5]]}; case (_count <= 475): {_requirements = [["ItemBriefcase100oz",6]]}; case (_count <= 550): {_requirements = [["ItemBriefcase100oz",7]]}; case (_count <= 625): {_requirements = [["ItemBriefcase100oz",8]]}; case (_count > 700): {_requirements = [["ItemBriefcase100oz",9]]}; };
  25. Like
    looter809 reacted to Shawn in lookg for config trader HPP list   
    Here, you can have mine.
    https://www.dropbox.com/sh/hw4u1imoehdje75/AACW_rLPfEMZ_ZE1nk339-xVa?dl=0
×
×
  • Create New...