Jump to content

Donnovan

Member
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    12

Reputation Activity

  1. Like
    Donnovan reacted to creativv in Query Port now forced to 27016?   
    Not having this issue over here Donnovan .
    Greetz
  2. Like
    Donnovan reacted to kelso000 in DayZ Launcher   
    I had this problem also, and need to manually refresh every ~25 minutes or so on dev.dayzlauncher.com. I made a macro to do it using a batch loop and imacros for firefox to do this every 25 mins. 
  3. Like
    Donnovan reacted to Doggyman in Andre Safe Zones for Arma 2 (It's good man!)   
    Works PERFECT
    Big THX Donnovan
    My Players love it :)
    I screw the God mode time down to 30seconds for players and 15seconds for cars is more as enough :)
    Look forward for you scripts.
  4. Like
    Donnovan got a reaction from RiMMON in Epoch - No lobby after death - How To   
    This is how i make no-lobby after death:
    Files to change:
    1 - Client side: compile\player_death.sqf
    use this custom player_death.sqf: https://www.dropbox.com/s/4yaijzuj1ieegiq/player_death.sqf?dl=0
    2 - Client side: description.ext (on the root of the mission file)
    Change this:
    respawndelay = 5; to this: respawndelay = 0; 3 - Server side: compile\server_playerSetup.sqf Look for this line:
    _playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}]; Add above it, this line: _playerObj removeAllMPEventHandlers "MPHit"; Create new file: 1 - Put this file in the root of the mission: https://www.dropbox.com/s/omb7n23bxcky2gl/player_monitor.fsm?dl=0
    It's a custom player_monitor.fsm to run everytime the player dies.
    2 - Create reinit.sqf, in root of the mission file, and add inside it this content:
    dayz_originalPlayer = player; _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}]; if (isServer) then {     waitUntil{dayz_preloadFinished}; }; mtdr_reinitOk = false; _id = [] execFSM "player_monitor.fsm"; waitUntil {mtdr_reinitOk}; //If you use ESS, uncomment the line bellow: //sorry, i dont know the start line for it //If you use ESS2, uncomment the line bellow: //execVM "spawn\start.sqf"; Anti Hack Problems
    I believe antihack kill the player if he goes to the debug area (respawn_west marker set in mission.sqm) after first respawn, so if you use antihack, the player will enter in a die/respawn/die/respaw cicle and probabily crash the game. Without antihack, it seens to work ok, but tell me if you find a problem.
    Thankyou.
  5. Like
    Donnovan reacted to js2k6 in Very simple earplugs script   
    Hi everyone,
    Made a very basic script for earplugs for A2 Epoch
    This method requires that you have dayz_spaceInterrupt.sqf in your mission.pbo
     
    I use snap pro in my server, so my space interrupt file is located at custom\snap_pro\dayz_spaceinterrupt.sqf
     
    look for the line that says
    // Disable ESC after death if (_dikCode == 0x01 && r_player_dead) then { _handled = true; }; then add this below
    if (_dikCode == 0x16) then     {         if (soundVolume == 1) then {             1 fadeSound 0.25;             hintSilent "Earplugs Inserted";         }             else         {             1 fadeSound 1;             hintSilent "Earplugs Removed";         };     }; 0x16 is the letter U,
     
    you can find a list of all other available keys at
    https://community.bistudio.com/wiki/DIK_KeyCodes
     
    You can let your players know about this feature in your servers welcome credits or by adding a system chat message in init.sqf
     
    Oh well, enjoy.
  6. Like
    Donnovan reacted to CordIAsis in [AdminTool] (I'm back) Working on it!   
    CSAT: Admin-Tool & Anti-Hack
    A free & pretty admin-tool and anti-hack.
     
    UPDATE
    I was very ill, I'm no longer ill(ish).
    Which means that I'm now working on CSAT again at long last. I've been working on it for the last 3-4 days and have already got a handful of new features implemented and made quite a few improvements on what was already there. I won't be working on this as much as I used to, I gotta keep my health in check, but the days I do work on it I'm gonna go HAM on this keyboard.
     
    Screenies:
    Patience, you must have.
     
    Video:
    Ain't nobody got time for that.
     
    Files:
    Computer says no.
     
    Ideas:
    If you have any ideas of what you might like in an admin tool, let me know.
     
    Features: (Fractional List)



     
  7. Like
    Donnovan got a reaction from Ghostis in Lootos - My Personal Loot System   
    This is my personal Loot System i share with you now.
    Hope you enjoy.
    You must allow this public variable in your BE filters: mtdr_lootActiveAdd.
    Installation: Run it at the end of your init.sqf with: execVM "script_path/script_name.sqf";
    Buildings in _mtdr_loot_buildings_class are from DayZ Mod.
    I have a tool to help you to fill the _mtdr_loot_buildings_spawnPos array. To share with you later if needed.
    private ["_mtdr_loot_buildings_class","_mtdr_loot_buildings_spawnPos","_mtdr_loot_items","_renewTime","_spawnAgain"]; //MTDR LOOT SYSTEM _map_size = 15360; _map_center = [_map_size/2,_map_size/2,0]; _map_rad = (_map_size * sqrt(2))/2; //Time after a spawned loot will try to be removed and //triggered to spawn again accordingly to _spawnAgain _renewTime = 1800; _spawnAgain = true; //Buildings that i want to have Loot Piles _mtdr_loot_buildings_class = [ "Land_A_Hospital", "Land_Mil_Barracks_i", "Land_a_stationhouse", "Land_A_GeneralStore_01", "Land_A_GeneralStore_01a", "Land_A_Pub_01", "Land_HouseV_1I4", "Land_Church_03", "Land_Church_01", "Land_HouseV2_02_Interier" ]; //Loot Pile Positions of Buildings in _mtdr_loot_buildings_class //[[Pile Pos in building Coords,Loot lie on ground?],[Another pos,Another f/t],...] _mtdr_loot_buildings_spawnPos = [ [[[-07.00,-04.00,-07.33],false]], [[[ 05.00, 02.00,-01.10],false]], [[[-01.20,-07.90,-09.47],false]], [[[-01.14, 01.37,-01.20],false]], [[[ 00.50, 05.00,-01.20],false]], [[[ 06.16, 05.46,-01.43],false]], [[[ 00.00, 03.70,-02.72],false]], [[[ 04.70,-00.10,-14.29],false],[[-17.50, 00.00,-14.29],true]], [[[-06.90, 00.29,-04.21],false]], [[[-00.14,-02.45,-05.53],false]] ]; //Items To place on the buildings. Array: //Items, //quantity*, //buildings in _mtdr_loot_buildings_class, //building preference. The higher the relative value the greater is the preference //true for quantity* overall / false for quantity* per building _mtdr_loot_items = [ [["ItemBandage"],1,[0,1,2,3,4,5,6,7,8,9],[10,10,10,10,10,10,10,10,10,10],false], [["ItemWatch"],12,[7,8],[10,10],true], [["DMR"],1,[2,5],[2,10],true], [["Makarov"],0.50,[5],[10],false] ]; if (isServer) then { private ["_mtdr_loot_buildings_objs","_mtdr_lootTable_bobj","_mtdr_lootTable_item","_mtdr_lootActive","_MTDR_fnc_selectRandom"]; waitUntil {!isNil "BIS_fnc_selectRandom"}; //Wait do give the chance to all mod and server custom buildings to spawn sleep 10; //Predefine loot locations _mtdr_loot_buildings_objs = []; _mtdr_loot_buildings_objs_count = []; { _class = _x; _objs = []; {if (typeOf _x == _class) then {_objs = _objs + [_x];};} forEach (_map_center nearObjects [_class,_map_rad]); _mtdr_loot_buildings_objs = _mtdr_loot_buildings_objs + [_objs]; } forEach _mtdr_loot_buildings_class; { _qtt = count _x; _mtdr_loot_buildings_objs_count = _mtdr_loot_buildings_objs_count + [_qtt]; } forEach _mtdr_loot_buildings_objs; _mtdr_lootTable_bobj = []; _mtdr_lootTable_item = []; _MTDR_fnc_selectRandom = {_index = round (random count _this - 0.5);_index}; { _prefArray = _x select 3; _perBuild = true; _total = 0; _totalB = 0; _mult = 1; if (_perBuild) then {_mult = 0;}; { _total = _total + (_mtdr_loot_buildings_objs_count select _x) * ((_prefArray select _forEachIndex) * _mult + (1 - _mult)); _totalB = _totalB + (_mtdr_loot_buildings_objs_count select _x); } forEach (_x select 2); { _qttB = (_mtdr_loot_buildings_objs_count select _x) * ((_prefArray select _forEachIndex) * _mult + (1 - _mult)); _prefArray set [_forEachIndex,(_qttB/_total) * 100]; } forEach (_x select 2); diag_log ("[MTDR LOOT] " + str (_x select 0) + ": _prefArray = " + str _prefArray); _qtt = _x select 1; if !(_x select 4) then {_qtt = round (_qtt * _totalB);}; for "_i" from 1 to _qtt do { _bTypeIndex = 0; while {true} do { _idx = (_x select 2) call _MTDR_fnc_selectRandom; if (random 100 < _prefArray select _idx) exitWith { _bTypeIndex = (_x select 2) select _idx; }; }; _buildObj = (_mtdr_loot_buildings_objs select _bTypeIndex) call BIS_fnc_selectRandom; _buildPos = getPosATL _buildObj; _item = (_x select 0) call BIS_fnc_selectRandom; _bIndex = _mtdr_lootTable_bobj find _buildObj; if (_bIndex == -1) then { _mtdr_lootTable_bobj = _mtdr_lootTable_bobj + [_buildObj]; _mtdr_lootTable_item = _mtdr_lootTable_item + [_item]; } else { _items = _mtdr_lootTable_item select _bIndex; if (typeName _items == "Array") then { _newPile = _items + [_item]; _mtdr_lootTable_item set [_bIndex,_newPile]; } else { _newPile = [_items] + [_item]; _mtdr_lootTable_item set [_bIndex,_newPile]; }; }; }; } forEach _mtdr_loot_items; mtdr_lootSystemMain = [_mtdr_lootTable_bobj,_mtdr_lootTable_item]; publicVariable "mtdr_lootSystemMain"; //Monitor for Abandoned Loot Deletion _mtdr_lootActive = []; "mtdr_lootActiveAdd" addPublicVariableEventHandler {_mtdr_lootActive = _mtdr_lootActive + [_this select 1];}; while {true} do { { _build = _x; _time = _build getVariable ["ml_used",0]; if (time - _time > _renewTime) then { _bPos = getPosATL _build; _nearP = false; {if (_bPos distance _x < 200) exitWith {_nearP = true;};} forEach playableUnits; if (!_nearP) then { _idx1 = _mtdr_loot_buildings_class find typeOf _build; _spawnPosAll = _mtdr_loot_buildings_spawnPos select _idx1; { _spawnPos = _build modelToWorld (_x select 0); _holders = _spawnPos nearObjects ["WeaponHolder",5]; _holder = objNull; if (count _holders > 0) then { { if (_x getVariable ["ml_hld",false]) exitWith {_holder = _x;}; } forEach _holders; }; if (!isNull _holder) then {deleteVehicle _holder;}; } forEach _spawnPosAll; _mtdr_lootActive = _mtdr_lootActive - [_build]; if (_spawnAgain) then { _build setVariable ["ml_used",-1,true]; }; }; }; uiSleep 0.001; } forEach _mtdr_lootActive; uiSleep 180; }; }; if (hasInterface) then { private ["_mtdr_lootTable_bobj","_mtdr_lootTable_item","_mtdr_pPosMain","_mtdr_calc_newBuilds","_mtdr_spawnLoot","_mtdr_lootTable_bobj_local","_mtdr_lootTable_item_local"]; waitUntil {!isNil "mtdr_lootSystemMain"}; _mtdr_lootTable_bobj = mtdr_lootSystemMain select 0; _mtdr_lootTable_item = mtdr_lootSystemMain select 1; _mtdr_pPosMain = getPosATL player; //Function to Find Loot buildings near the player //They are the ones that will be monitored in the loop _mtdr_calc_newBuilds = { _mtdr_lootTable_bobj_local = []; _mtdr_lootTable_item_local = []; { _bSize = (sizeOf typeOf _x) * 2; _dist = ((_mtdr_pPosMain distance _x) - _bSize) max 0; _items = _mtdr_lootTable_item select _forEachIndex; if (_dist < 300) then { _mtdr_lootTable_bobj_local = _mtdr_lootTable_bobj_local + [_x]; _mtdr_lootTable_item_local = _mtdr_lootTable_item_local + [_items]; }; } forEach _mtdr_lootTable_bobj; }; //Function to Spawn Loot _mtdr_spawnLoot = { _obj = _this select 0; _items = _this select 1; if (typeName _items != "Array") then {_items = [_items];}; _idx1 = _mtdr_loot_buildings_class find typeOf _obj; _spawnPosAll = _mtdr_loot_buildings_spawnPos select _idx1; { _spawnPosArray = _spawnPosAll call BIS_fnc_selectRandom; _spawnPos = _obj modelToWorld (_spawnPosArray select 0); _onGround = _spawnPosArray select 1; if (_onGround) then {_spawnPos = [_spawnPos select 0,_spawnPos select 1,0];}; _holders = _spawnPos nearObjects ["WeaponHolder",5]; _holder = objNull; if (count _holders > 0 && {_x getVariable ["ml_hld",false]} count _holders > 0) then { { if (_x getVariable ["ml_hld",false]) exitWith { _holder = _x; }; } forEach _holders; } else { _holder = createVehicle ["WeaponHolder",_spawnPos,[],0,"CAN_COLLIDE"]; _holder setPosATL _spawnPos; _holder setVariable ["ml_hld",true,true]; }; _isM = isClass (configFile >> "CfgMagazines" >> _x); if (_isM) then { _holder addMagazineCargoGlobal [_x,1]; } else { _isW = isClass (configFile >> "CfgWeapons" >> _x); if (_isW) then { _holder addWeaponCargoGlobal [_x,1]; } else { _isV = isClass (configFile >> "CfgVehicles" >> _x); if (_isV) then { _holder addBackpackCargoGlobal [_x,1]; } else { diag_log "[MTDR LOOT] TIPO DE LOOT NAO IDENTIFICADO!"; }; }; }; } forEach _items; mtdr_lootActiveAdd = _obj; publicVariableServer "mtdr_lootActiveAdd"; }; call _mtdr_calc_newBuilds; //Monitore for Loot Buildings to activate for player while {true} do { _pOnFoot = vehicle player == player; if (_pOnFoot) then { _pPos = getPosATL player; _walked = _mtdr_pPosMain distance _pPos; if (_walked > 280) then { _mtdr_pPosMain = _pPos; call _mtdr_calc_newBuilds; _walked = 0; }; { _bSize = sizeOf typeOf _x; _dist = ((_pPos distance _x) - _bSize) max 0; if (_dist == 0) then { _bUsed = _x getVariable ["ml_used",-1]; if (_bUsed == -1) then { _x setVariable ["ml_used",time,true]; _items = _mtdr_lootTable_item_local select _forEachIndex; [_x,_items] call _mtdr_spawnLoot; //systemChat "Loot Especial Matadouro...!"; }; }; } forEach _mtdr_lootTable_bobj_local; }; uiSleep 2; }; };
  8. Like
    Donnovan reacted to GaspArt in [Release] Pay for healing v1.0   
    Not so usefull script, but anyway I wrote it and thought, that should post it here :B
    Gold (standart) currency version here: Thx for oSoDirty!
    This script add an action for NPC's, that heals player for money.
    http://www.youtube.com/watch?v=6VKHj4MfMi8&feature=youtu.be
    Need:
    1. Custom fnSelfaction.sqf
    2. Custom variables.sqf
    3. Souls Single Currency 2.0
     
    Lets start install it:

    1. Open fnSelfaction and paste this code above " //Allow owner to pack vault ". So it must be like that:
     
    if(_typeOfCursorTarget in Fast_Med and (player distance _cursorTarget < 3)) then { if (s_fast_med_dialog1 < 0) then { s_fast_med_dialog1 = player addAction ["<t color='#0059FF'>Pay for treatment</t>", "Scripts\Medical\FastMed.sqf",_cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_fast_med_dialog1; s_fast_med_dialog1 = -1; }; //Allow owner to pack vault 2. Find 
    player removeAction s_bank_dialog; s_bank_dialog = -1; player removeAction s_bank_dialog2; s_bank_dialog2 = -1; and place under them that code:
     
    player removeAction s_fast_med_dialog1; s_fast_med_dialog1 = -1; 3.Open variables.sqf and add this code after "disableSerialization;":
     
    Fast_Med = ["NPC1","NPC1","NPC1"]; For instance 11 Cherna:
    Fast_Med = ["Dr_Annie_Baker_EP1","Doctor","Dr_Hladik_EP1"]; 4. Find:
    dayz_resetSelfActions = { and paste under this code:
     
    s_fast_med_dialog1 = -1; 5.Extract RAR archive and place scripts folder in your mission folder.
    6. Change cost for treatment in FastMed.sqf 
    7. Change NPCs in variables.sqf
    Download:Link
    8. Congratulations! Well done! Pew pew pew!


    In future gonna make checking of player needs.
    For example, player has only bleeding. So cost of healing will be = bandageCost * Tax. So u dont need to pay all cost for feeding or antibiotics.

     
  9. Like
    Donnovan reacted to raymix in Why go to Lobby after die?   
    Going back to lobby deletes all variables and loops and pretty much the whole mission namespace, then fresh cycle starts by loading new loops and initializing FSMs
    You are against quite a tough task my friend. Either way, as far as I remember it is the FSMs that initializes loadscreen, so start there.
  10. Like
    Donnovan reacted to Tweety060286 in Andre Safe Zones for Arma 2 (It's good man!)   
    Hello i have also test this script verry hard. 
    Its a really good script, verry verry thanks.
    But i have see one Problem, can you help me or change this.
    The Problem is the locked Vehicle have Godmode in the Safe Area, but Non Key vehicles have not Godmode.
    When i shoot from Outside into the Safezone on a Non Key vehicle , i can destroy it.
     
    Grezze
  11. Like
    Donnovan reacted to Tang0 in Andre Safe Zones for Arma 2 (It's good man!)   
    thnx :) (guys on my server love breaking stuff :) )
     
  12. Like
    Donnovan reacted to GudrunGisela in Andre Safe Zones for Arma 2 (It's good man!)   
    First of all thanks Donnovan for this awesome script :)
    My Co-Admin and me tested it intensively and we have only one last persistent problem. If the server restarts and the first player run into the safezone he doesn't have God Mode so it's possible to kill him. If he leaves the Safezone and runs again into it the God Mode works. After that everything worked fine until next restart. Always the first player who run into the safezone after restart has no God Mode until he leaves it and enters the safezone again. Is this problem known? How can I fix this? Thanks in advance.
    Edit:
    If anyone has the same problem just try this:
    Change this line:
    if (hasInterface) then {To:
    if (!isDedicated) then {That solved it for me.
    Greetings
     
     
  13. Like
    Donnovan got a reaction from creativv in Andre Organized Spawn Vehicles   
    SCRIPT UPDATED
    Changed the script to try to avoid vehicles to explode, but was not able to test it.
    The changes have a comment "//NEW LINE!" at the end (2 lines).
  14. Like
    Donnovan got a reaction from Linux in Andre Organized Spawn Vehicles   
    SCRIPT UPDATED
    Changed the script to try to avoid vehicles to explode, but was not able to test it.
    The changes have a comment "//NEW LINE!" at the end (2 lines).
  15. Like
    Donnovan reacted to Richie in Andre Organized Spawn Vehicles   
    Very nice and well documented, as always.
  16. Like
    Donnovan reacted to Linux in Andre Organized Spawn Vehicles   
    Thanks for this script!
  17. Like
    Donnovan got a reaction from Linux in Andre Organized Spawn Vehicles   
    Run it on the server, at the end of the server file init\server_functions.sqf.
    Play with the configurations.
    It will spawn temporary vehicles all over the map, acordingly to your configuration.
    Any doubt, please ask.
    Thankyou, and sory for no more info, there is nothing else can i say, but if you want to know something, please ask.
    //========================= // By Donnovan/Rubycon //========================= // Spawn Temporary Vehicles //========================= //CONFIGURATION 1 _mapSize = 15360; //SIZE OF THE MAP (DEFAULT IS CHERNARUS SIZE) _useVehAntiGlitch = true; //AVOID USE OF VEHICLES TO INVADE BASES _useTempVehMsg = true; //SEND MESSAGE ALERTING ABOUT TEMPORARY VEHICLE mtdr_runningMod = 0; //0 FOR EPOCH, 1 FOR DAYZ MOD AND 2 FOR OTHERS //CONFIGURATION 2 //VEHICLES TO SPAWN _vehClassAll = [ [//CARS (WEAK,NORMAL,STRONG) ["Tractor","car_sedan","SkodaRed","SkodaBlue","SkodaGreen","Lada1","Lada2"], ["UAZ_CDF","UralCivil","hilux1_civil_1_open","Baf_Offroad_W"], ["HMMWV_DZ","Offroad_DSHKM_INS","M113_PMC","landRover_CZ_EP1","SUV_TK_CIV_EP1"] ], [//HELI (WEAK,NORMAL,STRONG) ["MH6J_DZ","AH6X_DZ"], ["UH1H_DZ"], ["Mi17_DZ"] ] ]; //NUMBER OF EACH VEHICLES _vehClassQttAll = [ [//CARS QTT (WEAK,NORMAL,STRONG): TOTAL 70* 40, 20, 10 ], [//HELI QTT (WEAK,NORMAL,STRONG): TOTAL 15** 5, 5, 5 ] ]; //LOCATIONS TO SPAWN _locationTypesAll = [ [//CAR SPAWN LOCATION (VILLAGE/CITY/CAPITAL) //A LOT OF PLACES ["NameVillage"], //BEREZINO, KRASNOSTAV, SOLNICHNTY, ELEKTROZAVODSK, ETC ["NameCity"], //CHERNOGORSK, BALOTA AIRPORT AND NORTHWEST AIRPORT ["NameCityCapital","Airport"] ], [//HELI SPAWN LOCATION (VILLAGE/CITY/CAPITAL) //A LOT OF PLACES ["NameVillage"], //BEREZINO, KRASNOSTAV, SOLNICHNTY, ELEKTROZAVODSK, ETC ["NameCity"], //CHERNOGORSK, BALOTA AIRPORT AND NORTHWEST AIRPORT ["NameCityCapital","Airport"] ] ]; //NUMBER OF VEHICLES IN EACH LOCATION _locationTypesQttAll = [ [//CAR QTT IN LOCATION (VILLAGE/CITY/CAPITAL): TOTAL 70* (MUST MATCH TOTAL OF CARS) 40, 24, 6 ], [//HELI QTT IN LOCATION (VILLAGE/CITY/CAPITAL): TOTAL 15** (MUST MATCH TOTAL OF HELIS) 2, 5, 8 ] ]; //LOCATIONS SPAWN RAD _locationTypesRadAll = [ [//LOCATION RAD FOR CAR (VILLAGE/CITY/CAPITAL) 100, 200, 300 ], [//LOCATION RAD FOR HELI (VILLAGE/CITY/CAPITAL) 200, 400, 600 ] ]; //TENDENCIE MATRIX: //TRY THE MOST TO MARRY VILLAGE / CITY / CAPITAL PLACES WITH WEAK / NORMAL / STRONG VEHICLES, //RESPECTVELY, WITHOUT CHANGING THE TOTALS IN _vehClassQttAll AND _locationTypesQttAll _vehTendenciesUse = true; _vehTendencies = [ [ [ 0.02,-0.01,-0.01], [-0.01, 0.02,-0.01], [-0.01,-0.01, 0.02] ], [ [ 0.01, 0.00,-0.01], [ 0.00, 0.00, 0.00], [-0.01, 0.00, 0.01] ], [ [ 0.00, 0.00, 0.00], [ 0.00, 0.01,-0.01], [ 0.00,-0.01, 0.01] ], [ [ 0.01,-0.01, 0.00], [-0.01, 0.01, 0.00], [ 0.00, 0.00, 0.00] ] ]; //CLASSES OF THE VEHICLES TO BE SPAWNED TO FIX ROUND ERRORS _basketVehClass = ["UAZ_CDF","UralCivil","hilux1_civil_1_open","MH6J_DZ","AH6X_DZ","UH1H_DZ"]; //END OF CONFIGURATION //SCRIPT _countVeh = []; {_countVeh = _countVeh + [0];} forEach _vehClassAll; { //SET VARS _vehSet = _forEachIndex; _vehClass = _vehClassAll select _vehSet; _vehClassQtt = _vehClassQttAll select _vehSet; _locationTypes = _locationTypesAll select _vehSet; _locationTypesQtt = _locationTypesQttAll select _vehSet; _locationTypesRad = _locationTypesRadAll select _vehSet; //TOTAL VEHICLES _vehQtt = 0; {_vehQtt = _vehQtt + _x;} forEach _vehClassQtt; //QTT MATRIX CALCULATION _vehLocQtt = [ [(_vehClassQtt select 0)*(_locationTypesQtt select 0),(_vehClassQtt select 0)*(_locationTypesQtt select 1),(_vehClassQtt select 0)*(_locationTypesQtt select 2)], [(_vehClassQtt select 1)*(_locationTypesQtt select 0),(_vehClassQtt select 1)*(_locationTypesQtt select 1),(_vehClassQtt select 1)*(_locationTypesQtt select 2)], [(_vehClassQtt select 2)*(_locationTypesQtt select 0),(_vehClassQtt select 2)*(_locationTypesQtt select 1),(_vehClassQtt select 2)*(_locationTypesQtt select 2)] ]; _vehLocQtt = [ [(_vehLocQtt select 0 select 0)/_vehQtt,(_vehLocQtt select 0 select 1)/_vehQtt,(_vehLocQtt select 0 select 2)/_vehQtt], [(_vehLocQtt select 1 select 0)/_vehQtt,(_vehLocQtt select 1 select 1)/_vehQtt,(_vehLocQtt select 1 select 2)/_vehQtt], [(_vehLocQtt select 2 select 0)/_vehQtt,(_vehLocQtt select 2 select 1)/_vehQtt,(_vehLocQtt select 2 select 2)/_vehQtt] ]; //APLYES TENDENCIES if (_vehTendenciesUse) then { { _vehTendencie = _x; _lastMatrix = +_vehLocQtt; _stop = false; while {true} do { _newMatrix = []; { _line = _x; _lineI = _forEachIndex; _newLine = []; { _colI = _forEachIndex; _tend = _vehTendencie select _lineI select _colI; _newValor = _x + _tend; if (_newValor < 0) exitWith {_stop = true;}; _newLine = _newLine + [_newValor]; } forEach _line; if (_stop) exitWith {}; _newMatrix = _newMatrix + [_newLine]; } forEach _lastMatrix; if (_stop) exitWith {_vehLocQtt = +_lastMatrix;}; _lastMatrix = +_newMatrix; }; } forEach _vehTendencies; }; //ROUND VALUES _villBasket = 0; _cityBasket = 0; _captBasket = 0; _vehLocQttRnd = []; { _vill = (_x select 0); _city = (_x select 1); _capt = (_x select 2); _villR = round _vill; _cityR = round _city; _captR = round _capt; _villBasket = _vill - _villR; _cityBasket = _city - _cityR; _captBasket = _capt - _captR; _vehLocQttRnd = _vehLocQttRnd + [[_villR,_cityR,_captR]]; } forEach _vehLocQtt; //CORRECT ERROR GENERATED BY ROUND _vehLocQttRnd = _vehLocQttRnd + [[round _villBasket,round _cityBasket,round _captBasket]]; _vehClass = _vehClass + [_basketVehClass]; //FIND PLACES _places = []; _mapCenter = [_mapSize/2,_mapSize/2,0]; { _subPlaces = []; {_subPlaces = _subPlaces + nearestLocations [_mapCenter,[_x],15000];} forEach _x; _places = _places + [_subPlaces]; } forEach _locationTypes; //ANTI GLITCH FOR EXIT VEHICLE mtdr_getOut = { private ["_player","_veh","_builds"]; _veh = _this select 0; _player = _this select 2; if (mtdr_runningMod == 0) then { _builds = count (_veh nearObjects ["ModularItems",5]); _builds = _builds + count (_veh nearObjects ["Land_DZE_WoodDoorLocked_Base",5]); _builds = _builds + count (_veh nearObjects ["CinderWallDoorLocked_DZ_Base",5]); }; if (mtdr_runningMod == 1) then { _builds = count (_veh nearObjects ["DZ_buildables",5]); }; if (_builds > 0 && _veh isKindOf "LandVehicle") then { _bBox = boundingBox _veh; _h = abs((_bBox select 0 select 2) - (_bBox select 1 select 2)); _pos = getPosATL _veh; _pos = [_pos select 0,_pos select 1,_h]; _player setPosATL _pos; [nil,_player,"loc",rTITLETEXT,"You can''t exit vehicle too close to buildables objects.","PLAIN DOWN",5] call RE; }; }; //SEND MESSAGE ABOUT TEMPORARY VEHICLE mtdr_message = { private ["_player","_veh"]; _veh = _this select 0; _player = _this select 2; [nil,_player,"loc",rTITLETEXT,"\nThis is a temporary vehicle!","PLAIN DOWN",2] call RE; }; //SPAWN VEHICLES _failed = 0; _placeIndex = 0; waitUntil {!isNil "BIS_fnc_findSafePos" && !isNil "PVDZE_serverObjectMonitor"}; //NEW LINE! { _line = _x; _vehicles = _vehClass select _forEachIndex; { for "_c" from 1 to _x do { _placesSub = _places select _forEachIndex; _place = _placesSub select (_placeIndex mod (count _placesSub)); _placeIndex = _placeIndex + 1; _placePos = locationPosition _place; _placeRad = _locationTypesRad select _forEachIndex; _vehicle = _vehicles call BIS_fnc_selectRandom; _vehicleSize = (sizeOf _vehicle)/2; _pos = [_placePos,0,_placeRad,_vehicleSize,0,20,0,[],[_placePos,[0,0,0]]] call BIS_fnc_findSafePos; if !(_pos select 0 == _placePos select 0 && _pos select 1 == _placePos select 1) then { _pos = [_pos select 0,_pos select 1,1]; _veh = createVehicle [_vehicle,_pos,[],0,"CAN_COLLIDE"]; PVDZE_serverObjectMonitor = PVDZE_serverObjectMonitor + [_veh]; //NEW LINE! if (_useVehAntiGlitch && mtdr_runningMod < 2) then { _veh addEventHandler ["GetOut",{_this call mtdr_getOut;}]; }; if (_useTempVehMsg) then { _veh addEventHandler ["GetIn",{_this call mtdr_message;}]; }; _veh setDir random 360; _veh setVelocity [0,0,0.5]; _countVeh set [_vehSet,(_countVeh select _vehSet) + 1]; sleep (1/50); } else { _failed = _failed + 1; diag_log ("[SPAWN VEHICLE FAILED] fails = " + str _failed); }; }; } forEach _line; } forEach _vehLocQttRnd; diag_log ("[VEHICLES SPAWNED ON THE MAP] = " + str _countVeh); } forEach _vehClassAll;  
  18. Like
    Donnovan got a reaction from raymix in Andre Organized Spawn Vehicles   
    Run it on the server, at the end of the server file init\server_functions.sqf.
    Play with the configurations.
    It will spawn temporary vehicles all over the map, acordingly to your configuration.
    Any doubt, please ask.
    Thankyou, and sory for no more info, there is nothing else can i say, but if you want to know something, please ask.
    //========================= // By Donnovan/Rubycon //========================= // Spawn Temporary Vehicles //========================= //CONFIGURATION 1 _mapSize = 15360; //SIZE OF THE MAP (DEFAULT IS CHERNARUS SIZE) _useVehAntiGlitch = true; //AVOID USE OF VEHICLES TO INVADE BASES _useTempVehMsg = true; //SEND MESSAGE ALERTING ABOUT TEMPORARY VEHICLE mtdr_runningMod = 0; //0 FOR EPOCH, 1 FOR DAYZ MOD AND 2 FOR OTHERS //CONFIGURATION 2 //VEHICLES TO SPAWN _vehClassAll = [ [//CARS (WEAK,NORMAL,STRONG) ["Tractor","car_sedan","SkodaRed","SkodaBlue","SkodaGreen","Lada1","Lada2"], ["UAZ_CDF","UralCivil","hilux1_civil_1_open","Baf_Offroad_W"], ["HMMWV_DZ","Offroad_DSHKM_INS","M113_PMC","landRover_CZ_EP1","SUV_TK_CIV_EP1"] ], [//HELI (WEAK,NORMAL,STRONG) ["MH6J_DZ","AH6X_DZ"], ["UH1H_DZ"], ["Mi17_DZ"] ] ]; //NUMBER OF EACH VEHICLES _vehClassQttAll = [ [//CARS QTT (WEAK,NORMAL,STRONG): TOTAL 70* 40, 20, 10 ], [//HELI QTT (WEAK,NORMAL,STRONG): TOTAL 15** 5, 5, 5 ] ]; //LOCATIONS TO SPAWN _locationTypesAll = [ [//CAR SPAWN LOCATION (VILLAGE/CITY/CAPITAL) //A LOT OF PLACES ["NameVillage"], //BEREZINO, KRASNOSTAV, SOLNICHNTY, ELEKTROZAVODSK, ETC ["NameCity"], //CHERNOGORSK, BALOTA AIRPORT AND NORTHWEST AIRPORT ["NameCityCapital","Airport"] ], [//HELI SPAWN LOCATION (VILLAGE/CITY/CAPITAL) //A LOT OF PLACES ["NameVillage"], //BEREZINO, KRASNOSTAV, SOLNICHNTY, ELEKTROZAVODSK, ETC ["NameCity"], //CHERNOGORSK, BALOTA AIRPORT AND NORTHWEST AIRPORT ["NameCityCapital","Airport"] ] ]; //NUMBER OF VEHICLES IN EACH LOCATION _locationTypesQttAll = [ [//CAR QTT IN LOCATION (VILLAGE/CITY/CAPITAL): TOTAL 70* (MUST MATCH TOTAL OF CARS) 40, 24, 6 ], [//HELI QTT IN LOCATION (VILLAGE/CITY/CAPITAL): TOTAL 15** (MUST MATCH TOTAL OF HELIS) 2, 5, 8 ] ]; //LOCATIONS SPAWN RAD _locationTypesRadAll = [ [//LOCATION RAD FOR CAR (VILLAGE/CITY/CAPITAL) 100, 200, 300 ], [//LOCATION RAD FOR HELI (VILLAGE/CITY/CAPITAL) 200, 400, 600 ] ]; //TENDENCIE MATRIX: //TRY THE MOST TO MARRY VILLAGE / CITY / CAPITAL PLACES WITH WEAK / NORMAL / STRONG VEHICLES, //RESPECTVELY, WITHOUT CHANGING THE TOTALS IN _vehClassQttAll AND _locationTypesQttAll _vehTendenciesUse = true; _vehTendencies = [ [ [ 0.02,-0.01,-0.01], [-0.01, 0.02,-0.01], [-0.01,-0.01, 0.02] ], [ [ 0.01, 0.00,-0.01], [ 0.00, 0.00, 0.00], [-0.01, 0.00, 0.01] ], [ [ 0.00, 0.00, 0.00], [ 0.00, 0.01,-0.01], [ 0.00,-0.01, 0.01] ], [ [ 0.01,-0.01, 0.00], [-0.01, 0.01, 0.00], [ 0.00, 0.00, 0.00] ] ]; //CLASSES OF THE VEHICLES TO BE SPAWNED TO FIX ROUND ERRORS _basketVehClass = ["UAZ_CDF","UralCivil","hilux1_civil_1_open","MH6J_DZ","AH6X_DZ","UH1H_DZ"]; //END OF CONFIGURATION //SCRIPT _countVeh = []; {_countVeh = _countVeh + [0];} forEach _vehClassAll; { //SET VARS _vehSet = _forEachIndex; _vehClass = _vehClassAll select _vehSet; _vehClassQtt = _vehClassQttAll select _vehSet; _locationTypes = _locationTypesAll select _vehSet; _locationTypesQtt = _locationTypesQttAll select _vehSet; _locationTypesRad = _locationTypesRadAll select _vehSet; //TOTAL VEHICLES _vehQtt = 0; {_vehQtt = _vehQtt + _x;} forEach _vehClassQtt; //QTT MATRIX CALCULATION _vehLocQtt = [ [(_vehClassQtt select 0)*(_locationTypesQtt select 0),(_vehClassQtt select 0)*(_locationTypesQtt select 1),(_vehClassQtt select 0)*(_locationTypesQtt select 2)], [(_vehClassQtt select 1)*(_locationTypesQtt select 0),(_vehClassQtt select 1)*(_locationTypesQtt select 1),(_vehClassQtt select 1)*(_locationTypesQtt select 2)], [(_vehClassQtt select 2)*(_locationTypesQtt select 0),(_vehClassQtt select 2)*(_locationTypesQtt select 1),(_vehClassQtt select 2)*(_locationTypesQtt select 2)] ]; _vehLocQtt = [ [(_vehLocQtt select 0 select 0)/_vehQtt,(_vehLocQtt select 0 select 1)/_vehQtt,(_vehLocQtt select 0 select 2)/_vehQtt], [(_vehLocQtt select 1 select 0)/_vehQtt,(_vehLocQtt select 1 select 1)/_vehQtt,(_vehLocQtt select 1 select 2)/_vehQtt], [(_vehLocQtt select 2 select 0)/_vehQtt,(_vehLocQtt select 2 select 1)/_vehQtt,(_vehLocQtt select 2 select 2)/_vehQtt] ]; //APLYES TENDENCIES if (_vehTendenciesUse) then { { _vehTendencie = _x; _lastMatrix = +_vehLocQtt; _stop = false; while {true} do { _newMatrix = []; { _line = _x; _lineI = _forEachIndex; _newLine = []; { _colI = _forEachIndex; _tend = _vehTendencie select _lineI select _colI; _newValor = _x + _tend; if (_newValor < 0) exitWith {_stop = true;}; _newLine = _newLine + [_newValor]; } forEach _line; if (_stop) exitWith {}; _newMatrix = _newMatrix + [_newLine]; } forEach _lastMatrix; if (_stop) exitWith {_vehLocQtt = +_lastMatrix;}; _lastMatrix = +_newMatrix; }; } forEach _vehTendencies; }; //ROUND VALUES _villBasket = 0; _cityBasket = 0; _captBasket = 0; _vehLocQttRnd = []; { _vill = (_x select 0); _city = (_x select 1); _capt = (_x select 2); _villR = round _vill; _cityR = round _city; _captR = round _capt; _villBasket = _vill - _villR; _cityBasket = _city - _cityR; _captBasket = _capt - _captR; _vehLocQttRnd = _vehLocQttRnd + [[_villR,_cityR,_captR]]; } forEach _vehLocQtt; //CORRECT ERROR GENERATED BY ROUND _vehLocQttRnd = _vehLocQttRnd + [[round _villBasket,round _cityBasket,round _captBasket]]; _vehClass = _vehClass + [_basketVehClass]; //FIND PLACES _places = []; _mapCenter = [_mapSize/2,_mapSize/2,0]; { _subPlaces = []; {_subPlaces = _subPlaces + nearestLocations [_mapCenter,[_x],15000];} forEach _x; _places = _places + [_subPlaces]; } forEach _locationTypes; //ANTI GLITCH FOR EXIT VEHICLE mtdr_getOut = { private ["_player","_veh","_builds"]; _veh = _this select 0; _player = _this select 2; if (mtdr_runningMod == 0) then { _builds = count (_veh nearObjects ["ModularItems",5]); _builds = _builds + count (_veh nearObjects ["Land_DZE_WoodDoorLocked_Base",5]); _builds = _builds + count (_veh nearObjects ["CinderWallDoorLocked_DZ_Base",5]); }; if (mtdr_runningMod == 1) then { _builds = count (_veh nearObjects ["DZ_buildables",5]); }; if (_builds > 0 && _veh isKindOf "LandVehicle") then { _bBox = boundingBox _veh; _h = abs((_bBox select 0 select 2) - (_bBox select 1 select 2)); _pos = getPosATL _veh; _pos = [_pos select 0,_pos select 1,_h]; _player setPosATL _pos; [nil,_player,"loc",rTITLETEXT,"You can''t exit vehicle too close to buildables objects.","PLAIN DOWN",5] call RE; }; }; //SEND MESSAGE ABOUT TEMPORARY VEHICLE mtdr_message = { private ["_player","_veh"]; _veh = _this select 0; _player = _this select 2; [nil,_player,"loc",rTITLETEXT,"\nThis is a temporary vehicle!","PLAIN DOWN",2] call RE; }; //SPAWN VEHICLES _failed = 0; _placeIndex = 0; waitUntil {!isNil "BIS_fnc_findSafePos" && !isNil "PVDZE_serverObjectMonitor"}; //NEW LINE! { _line = _x; _vehicles = _vehClass select _forEachIndex; { for "_c" from 1 to _x do { _placesSub = _places select _forEachIndex; _place = _placesSub select (_placeIndex mod (count _placesSub)); _placeIndex = _placeIndex + 1; _placePos = locationPosition _place; _placeRad = _locationTypesRad select _forEachIndex; _vehicle = _vehicles call BIS_fnc_selectRandom; _vehicleSize = (sizeOf _vehicle)/2; _pos = [_placePos,0,_placeRad,_vehicleSize,0,20,0,[],[_placePos,[0,0,0]]] call BIS_fnc_findSafePos; if !(_pos select 0 == _placePos select 0 && _pos select 1 == _placePos select 1) then { _pos = [_pos select 0,_pos select 1,1]; _veh = createVehicle [_vehicle,_pos,[],0,"CAN_COLLIDE"]; PVDZE_serverObjectMonitor = PVDZE_serverObjectMonitor + [_veh]; //NEW LINE! if (_useVehAntiGlitch && mtdr_runningMod < 2) then { _veh addEventHandler ["GetOut",{_this call mtdr_getOut;}]; }; if (_useTempVehMsg) then { _veh addEventHandler ["GetIn",{_this call mtdr_message;}]; }; _veh setDir random 360; _veh setVelocity [0,0,0.5]; _countVeh set [_vehSet,(_countVeh select _vehSet) + 1]; sleep (1/50); } else { _failed = _failed + 1; diag_log ("[SPAWN VEHICLE FAILED] fails = " + str _failed); }; }; } forEach _line; } forEach _vehLocQttRnd; diag_log ("[VEHICLES SPAWNED ON THE MAP] = " + str _countVeh); } forEach _vehClassAll;  
  19. Like
    Donnovan got a reaction from Richie in Andre Organized Spawn Vehicles   
    Run it on the server, at the end of the server file init\server_functions.sqf.
    Play with the configurations.
    It will spawn temporary vehicles all over the map, acordingly to your configuration.
    Any doubt, please ask.
    Thankyou, and sory for no more info, there is nothing else can i say, but if you want to know something, please ask.
    //========================= // By Donnovan/Rubycon //========================= // Spawn Temporary Vehicles //========================= //CONFIGURATION 1 _mapSize = 15360; //SIZE OF THE MAP (DEFAULT IS CHERNARUS SIZE) _useVehAntiGlitch = true; //AVOID USE OF VEHICLES TO INVADE BASES _useTempVehMsg = true; //SEND MESSAGE ALERTING ABOUT TEMPORARY VEHICLE mtdr_runningMod = 0; //0 FOR EPOCH, 1 FOR DAYZ MOD AND 2 FOR OTHERS //CONFIGURATION 2 //VEHICLES TO SPAWN _vehClassAll = [ [//CARS (WEAK,NORMAL,STRONG) ["Tractor","car_sedan","SkodaRed","SkodaBlue","SkodaGreen","Lada1","Lada2"], ["UAZ_CDF","UralCivil","hilux1_civil_1_open","Baf_Offroad_W"], ["HMMWV_DZ","Offroad_DSHKM_INS","M113_PMC","landRover_CZ_EP1","SUV_TK_CIV_EP1"] ], [//HELI (WEAK,NORMAL,STRONG) ["MH6J_DZ","AH6X_DZ"], ["UH1H_DZ"], ["Mi17_DZ"] ] ]; //NUMBER OF EACH VEHICLES _vehClassQttAll = [ [//CARS QTT (WEAK,NORMAL,STRONG): TOTAL 70* 40, 20, 10 ], [//HELI QTT (WEAK,NORMAL,STRONG): TOTAL 15** 5, 5, 5 ] ]; //LOCATIONS TO SPAWN _locationTypesAll = [ [//CAR SPAWN LOCATION (VILLAGE/CITY/CAPITAL) //A LOT OF PLACES ["NameVillage"], //BEREZINO, KRASNOSTAV, SOLNICHNTY, ELEKTROZAVODSK, ETC ["NameCity"], //CHERNOGORSK, BALOTA AIRPORT AND NORTHWEST AIRPORT ["NameCityCapital","Airport"] ], [//HELI SPAWN LOCATION (VILLAGE/CITY/CAPITAL) //A LOT OF PLACES ["NameVillage"], //BEREZINO, KRASNOSTAV, SOLNICHNTY, ELEKTROZAVODSK, ETC ["NameCity"], //CHERNOGORSK, BALOTA AIRPORT AND NORTHWEST AIRPORT ["NameCityCapital","Airport"] ] ]; //NUMBER OF VEHICLES IN EACH LOCATION _locationTypesQttAll = [ [//CAR QTT IN LOCATION (VILLAGE/CITY/CAPITAL): TOTAL 70* (MUST MATCH TOTAL OF CARS) 40, 24, 6 ], [//HELI QTT IN LOCATION (VILLAGE/CITY/CAPITAL): TOTAL 15** (MUST MATCH TOTAL OF HELIS) 2, 5, 8 ] ]; //LOCATIONS SPAWN RAD _locationTypesRadAll = [ [//LOCATION RAD FOR CAR (VILLAGE/CITY/CAPITAL) 100, 200, 300 ], [//LOCATION RAD FOR HELI (VILLAGE/CITY/CAPITAL) 200, 400, 600 ] ]; //TENDENCIE MATRIX: //TRY THE MOST TO MARRY VILLAGE / CITY / CAPITAL PLACES WITH WEAK / NORMAL / STRONG VEHICLES, //RESPECTVELY, WITHOUT CHANGING THE TOTALS IN _vehClassQttAll AND _locationTypesQttAll _vehTendenciesUse = true; _vehTendencies = [ [ [ 0.02,-0.01,-0.01], [-0.01, 0.02,-0.01], [-0.01,-0.01, 0.02] ], [ [ 0.01, 0.00,-0.01], [ 0.00, 0.00, 0.00], [-0.01, 0.00, 0.01] ], [ [ 0.00, 0.00, 0.00], [ 0.00, 0.01,-0.01], [ 0.00,-0.01, 0.01] ], [ [ 0.01,-0.01, 0.00], [-0.01, 0.01, 0.00], [ 0.00, 0.00, 0.00] ] ]; //CLASSES OF THE VEHICLES TO BE SPAWNED TO FIX ROUND ERRORS _basketVehClass = ["UAZ_CDF","UralCivil","hilux1_civil_1_open","MH6J_DZ","AH6X_DZ","UH1H_DZ"]; //END OF CONFIGURATION //SCRIPT _countVeh = []; {_countVeh = _countVeh + [0];} forEach _vehClassAll; { //SET VARS _vehSet = _forEachIndex; _vehClass = _vehClassAll select _vehSet; _vehClassQtt = _vehClassQttAll select _vehSet; _locationTypes = _locationTypesAll select _vehSet; _locationTypesQtt = _locationTypesQttAll select _vehSet; _locationTypesRad = _locationTypesRadAll select _vehSet; //TOTAL VEHICLES _vehQtt = 0; {_vehQtt = _vehQtt + _x;} forEach _vehClassQtt; //QTT MATRIX CALCULATION _vehLocQtt = [ [(_vehClassQtt select 0)*(_locationTypesQtt select 0),(_vehClassQtt select 0)*(_locationTypesQtt select 1),(_vehClassQtt select 0)*(_locationTypesQtt select 2)], [(_vehClassQtt select 1)*(_locationTypesQtt select 0),(_vehClassQtt select 1)*(_locationTypesQtt select 1),(_vehClassQtt select 1)*(_locationTypesQtt select 2)], [(_vehClassQtt select 2)*(_locationTypesQtt select 0),(_vehClassQtt select 2)*(_locationTypesQtt select 1),(_vehClassQtt select 2)*(_locationTypesQtt select 2)] ]; _vehLocQtt = [ [(_vehLocQtt select 0 select 0)/_vehQtt,(_vehLocQtt select 0 select 1)/_vehQtt,(_vehLocQtt select 0 select 2)/_vehQtt], [(_vehLocQtt select 1 select 0)/_vehQtt,(_vehLocQtt select 1 select 1)/_vehQtt,(_vehLocQtt select 1 select 2)/_vehQtt], [(_vehLocQtt select 2 select 0)/_vehQtt,(_vehLocQtt select 2 select 1)/_vehQtt,(_vehLocQtt select 2 select 2)/_vehQtt] ]; //APLYES TENDENCIES if (_vehTendenciesUse) then { { _vehTendencie = _x; _lastMatrix = +_vehLocQtt; _stop = false; while {true} do { _newMatrix = []; { _line = _x; _lineI = _forEachIndex; _newLine = []; { _colI = _forEachIndex; _tend = _vehTendencie select _lineI select _colI; _newValor = _x + _tend; if (_newValor < 0) exitWith {_stop = true;}; _newLine = _newLine + [_newValor]; } forEach _line; if (_stop) exitWith {}; _newMatrix = _newMatrix + [_newLine]; } forEach _lastMatrix; if (_stop) exitWith {_vehLocQtt = +_lastMatrix;}; _lastMatrix = +_newMatrix; }; } forEach _vehTendencies; }; //ROUND VALUES _villBasket = 0; _cityBasket = 0; _captBasket = 0; _vehLocQttRnd = []; { _vill = (_x select 0); _city = (_x select 1); _capt = (_x select 2); _villR = round _vill; _cityR = round _city; _captR = round _capt; _villBasket = _vill - _villR; _cityBasket = _city - _cityR; _captBasket = _capt - _captR; _vehLocQttRnd = _vehLocQttRnd + [[_villR,_cityR,_captR]]; } forEach _vehLocQtt; //CORRECT ERROR GENERATED BY ROUND _vehLocQttRnd = _vehLocQttRnd + [[round _villBasket,round _cityBasket,round _captBasket]]; _vehClass = _vehClass + [_basketVehClass]; //FIND PLACES _places = []; _mapCenter = [_mapSize/2,_mapSize/2,0]; { _subPlaces = []; {_subPlaces = _subPlaces + nearestLocations [_mapCenter,[_x],15000];} forEach _x; _places = _places + [_subPlaces]; } forEach _locationTypes; //ANTI GLITCH FOR EXIT VEHICLE mtdr_getOut = { private ["_player","_veh","_builds"]; _veh = _this select 0; _player = _this select 2; if (mtdr_runningMod == 0) then { _builds = count (_veh nearObjects ["ModularItems",5]); _builds = _builds + count (_veh nearObjects ["Land_DZE_WoodDoorLocked_Base",5]); _builds = _builds + count (_veh nearObjects ["CinderWallDoorLocked_DZ_Base",5]); }; if (mtdr_runningMod == 1) then { _builds = count (_veh nearObjects ["DZ_buildables",5]); }; if (_builds > 0 && _veh isKindOf "LandVehicle") then { _bBox = boundingBox _veh; _h = abs((_bBox select 0 select 2) - (_bBox select 1 select 2)); _pos = getPosATL _veh; _pos = [_pos select 0,_pos select 1,_h]; _player setPosATL _pos; [nil,_player,"loc",rTITLETEXT,"You can''t exit vehicle too close to buildables objects.","PLAIN DOWN",5] call RE; }; }; //SEND MESSAGE ABOUT TEMPORARY VEHICLE mtdr_message = { private ["_player","_veh"]; _veh = _this select 0; _player = _this select 2; [nil,_player,"loc",rTITLETEXT,"\nThis is a temporary vehicle!","PLAIN DOWN",2] call RE; }; //SPAWN VEHICLES _failed = 0; _placeIndex = 0; waitUntil {!isNil "BIS_fnc_findSafePos" && !isNil "PVDZE_serverObjectMonitor"}; //NEW LINE! { _line = _x; _vehicles = _vehClass select _forEachIndex; { for "_c" from 1 to _x do { _placesSub = _places select _forEachIndex; _place = _placesSub select (_placeIndex mod (count _placesSub)); _placeIndex = _placeIndex + 1; _placePos = locationPosition _place; _placeRad = _locationTypesRad select _forEachIndex; _vehicle = _vehicles call BIS_fnc_selectRandom; _vehicleSize = (sizeOf _vehicle)/2; _pos = [_placePos,0,_placeRad,_vehicleSize,0,20,0,[],[_placePos,[0,0,0]]] call BIS_fnc_findSafePos; if !(_pos select 0 == _placePos select 0 && _pos select 1 == _placePos select 1) then { _pos = [_pos select 0,_pos select 1,1]; _veh = createVehicle [_vehicle,_pos,[],0,"CAN_COLLIDE"]; PVDZE_serverObjectMonitor = PVDZE_serverObjectMonitor + [_veh]; //NEW LINE! if (_useVehAntiGlitch && mtdr_runningMod < 2) then { _veh addEventHandler ["GetOut",{_this call mtdr_getOut;}]; }; if (_useTempVehMsg) then { _veh addEventHandler ["GetIn",{_this call mtdr_message;}]; }; _veh setDir random 360; _veh setVelocity [0,0,0.5]; _countVeh set [_vehSet,(_countVeh select _vehSet) + 1]; sleep (1/50); } else { _failed = _failed + 1; diag_log ("[SPAWN VEHICLE FAILED] fails = " + str _failed); }; }; } forEach _line; } forEach _vehLocQttRnd; diag_log ("[VEHICLES SPAWNED ON THE MAP] = " + str _countVeh); } forEach _vehClassAll;  
  20. Like
    Donnovan got a reaction from Ree in Andre Safe Zones for Arma 2 (It's good man!)   
    MEGA UPDATE ON 26 OF OCTOBER OF 2015
    FEATURES
    - COMPATIBLE WITH INFISTAR
    - COMPATIBLE WITH DZGM
    - PEOPLE TAGGED AS FRIENDLY OR IN YOUR GROUP (DZGM) CAN ACCESS YOUR GEAR
    - PEOPLE TAGGED AS FRIENDLY OR IN YOUR GROUP (DZGM) CAN ACCESS YOUR CAR & CAR GEAR
    - A CAR IS YOURS IF YOU ENTERED THE SAFEZONE DRIVING IT
    - NO-BUILD ZONES ARROUND SAFEZONES
    - 60 SECONDS, FOR PLAYERS ON FOOT, OR 30 SECONDS, FOR MOTORIZED PLAYERS, EXTRA GOD MODE ON SAFE ZONE EXIT
    - PLAYER GOD MODE AND NO-SHOT MODE
    - REAL VEHICLE GOD MODE AND VEHICLE NO-SHOT MODE FOR ALL PLAYERS
     
    If it worked and you enjoy it, i ask for a donation. Thankyou!
     $USD
     $EURO
     
    INSTALLATION
    Put the file andre_safezone.sqf in the root of you mission file.
    Add to the end of your init.sqf the line: execVM "andre_safezone.sqf";
     
    THE SCRIPT andre_safezones.sqf
    if (hasInterface) then { //MAP SAFEZONES (READY FOR CHERNARUS) donn_traders = [ ["Safe 1",[6325,7807,0],160,500], ["Safe 2",[4063,11664,0],160,500], ["Safe 3",[11447,11364,0],160,500], ["Safe 4",[1606,7803,0],160,500], ["Safe 5",[12944,12766,0],160,500], ["Safe 6",[12060,12640,0],160,500] ]; waitUntil {uiSleep 0.5;!isNil "PVDZE_plr_LoginRecord"}; inSafeZone = false; donn_InSafeZone = false; donn_canbuild = true; donn_incarWas = []; donn_inSafeCounter = 0; donn_vehicle_handleDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf"; vehicle_handleDamage_timer = 0; vehicle_handleDamage = { _owner = (_this select 0) getVariable ["don_owner",objNull]; _hasOwner = !isNull _owner; if (_hasOwner) then { if (time - vehicle_handleDamage_timer > 2) then { vehicle_handleDamage_timer = time; systemChat "This vehicle have God Mode!"; }; } else { _this call donn_vehicle_handleDamage; }; }; //SAFEZONE PROXIMITY CHECK FUNCTION donn_calcSafe = { private ["_tName","_tPos","_tRad"]; _obj = _this select 0; _radNumber = 1 + (_this select 1); _minDist = 100000; { _safePos = _x select 1; _safeRad = _x select _radNumber; _dist = (_obj distance _safePos) - _safeRad; if (_dist < _minDist) then { _minDist = _dist; _tName = _x select 0; _tPos = _x select 1; _tRad = _safeRad; }; } forEach donn_traders; [_minDist,_tName,_tPos,_tRad] }; //SAFEZONE ENTER AND EXIT [] spawn { _maxVel = 80; while {true} do { //CHECK IF IN SAFE _result = [player,1] call donn_calcSafe;_minDist = _result select 0; while {_minDist > 0} do { uiSleep (((_minDist/_maxVel) max 1) min 10); _result = [player,1] call donn_calcSafe; _minDist = _result select 0; }; //SAFE ON donn_InSafeZone = true; donn_inSafeCounter = donn_inSafeCounter + 1; systemChat "You are in the Safe Zone..."; player_zombieCheck = {}; fnc_usec_unconscious = {}; fnc_usec_damageHandler_timer = 0; fnc_usec_damageHandler = { _attacker = _this select 3; if (!isNull _attacker) then { if (isPlayer _attacker) then { if (time - fnc_usec_damageHandler_timer > 2) then { fnc_usec_damageHandler_timer = time; [nil,_attacker,"loc",rHINT,"This player have God Mode!"] call RE; }; }; }; _damage = 0; _damage }; player_fired = {deleteVehicle (_this select 6);}; player setCaptive true; inSafeZone = true; //INFISTAR FIRED EH RELATED _veh = vehicle player; if (_veh != player) then { donn_incarWas = donn_incarWas + [_veh]; _veh addEventHandler ["Fired",{deleteVehicle (_this select 6);}]; if (player == driver _veh) then { _veh setVariable ['don_owner',driver _veh,true]; }; }; //CHECK IF LEAVED FROM SAFE _tPos = _result select 2; _tRad = _result select 3; _dist = player distance _tPos; while {_dist < _tRad} do { uiSleep 1; _dist = player distance _tPos; }; //LEAVED SAFE donn_InSafeZone = false; systemChat "You leaved the Safe Zone..."; donn_inSafeCounter spawn { _inSafeIndex = _this; _unGod = true; for "_c" from 0 to 5 do { _sleep = 10; if (vehicle player != player) then {_sleep = 5;}; systemChat ("God Mode ends in " + str (_sleep*6-_c*_sleep) + "/" + str (_sleep*6) + " seconds."); uiSleep _sleep; if (donn_InSafeZone || _inSafeIndex != donn_inSafeCounter) exitWith { _unGod = false; }; }; if (_unGod) then { systemChat "God Mode ended!"; player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf"; fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; player setCaptive false; inSafeZone = false; //INFISTAR FIRED EH RELATED { _x removeAllEventHandlers "Fired"; _inSafe = ([_x,1] call donn_calcSafe) select 0 < 0; if (!_inSafe) then { _ownerSet = !isNull (_x getVariable ['don_owner',objNull]); if (_ownerSet) then { _x setVariable ['don_owner',objNull,true]; }; }; } forEach donn_incarWas; donn_incarWas = []; }; }; }; }; //IN BUILD ZONE CHECK [] spawn { _maxVel = 50; while {true} do { _result = [player,2] call donn_calcSafe; _minDist = _result select 0; while {_minDist > 0} do { uiSleep (((_minDist/_maxVel) max 2) min 10); _result = [player,2] call donn_calcSafe; _minDist = _result select 0; }; donn_canbuild = false; systemChat "Your are in the NoBuild zone..."; _tPos = _result select 2; _tRad = _result select 3; _dist = player distance _tPos; while {_dist < _tRad} do { uiSleep 2; _dist = player distance _tPos; }; donn_canbuild = true; systemChat "You leaved the NoBuild zone..."; }; }; //ENTERING VEHICLES PROTECTION don_incar = false; [] spawn { while {true} do { waitUntil {uiSleep 1;don_player_veh = vehicle player;don_player_veh != player}; don_incar = true; don_player_veh_isAir = don_player_veh isKindOf "Air"; //NOT NECESSARY if (donn_InSafeZone) then { _don_veh_owner = don_player_veh getVariable ['don_owner',objNull]; if (isNull _don_veh_owner) then { don_player_veh setVariable ['don_owner',player,true]; _don_veh_owner = player; }; _ownerGroup = units group _don_veh_owner; _ownerGroupTag = _don_veh_owner getVariable ["friendlies",[]]; _playerID = player getVariable ["CharacterID","0"]; if (player in _ownerGroup || _playerID in _ownerGroupTag) then { if !(don_player_veh in donn_incarWas) then { donn_incarWas = donn_incarWas + [don_player_veh]; don_player_veh addEventHandler ["Fired",{deleteVehicle (_this select 6);}]; }; } else { player action ['getOut', don_player_veh]; }; }; waitUntil {uiSleep 1; vehicle player != don_player_veh}; don_incar = false; }; }; //GEAR PROTECTION [] spawn { while {true} do { _playerID = player getVariable ["CharacterID",0]; if (donn_InSafeZone) then { if (!don_incar) then { //CHECK NEAR PLAYERS AND VEHICLES _nearP = [];_nearV = []; { if (isPlayer _x && _x != player) then {_nearP = _nearP + [_x];}; } forEach (player nearEntities ['CAManBase',4]); _countNear = count _nearP; { if (player distance _x < ((sizeOf typeOf _x)/2) + 3) then {_nearV = _nearV + [_x];}; } forEach (player nearEntities [['LandVehicle','Air','Ship'],25]); _countNear = _countNear + count _nearV; //CHECK IF ALL ARE FRIENDLY _friends = units group player; if (_countNear > 0) then { _countNearF = {_x in _friends || _playerID in (_x getVariable ["friendlies",[]])} count _nearP; _countNearF = _countNearF + ({_owner = _x getVariable ['don_owner',objNull];_owner in _friends || _playerID in (_owner getVariable ["friendlies",[]])} count _nearV); if (_countNear > _countNearF && !isNull findDisplay 106) then { (findDisplay 106) closedisplay 0; closeDialog 0;closeDialog 0;closeDialog 0; cutText [format['%1. You is near a stranger player or vehicle and cant access gear now.',name player],'PLAIN']; }; }; }; uiSleep 0.25; } else { uiSleep 2; }; }; }; //LOG INFO diag_log "[ANDRE SAFEZONES] SCRIPT LOADED OK!"; };  
    NO-BUILD ZONES 1 - NO GENERAL BUILD
    You must have a custom player_build.sqf. On your custom player_build.sqf, search for this code:
    //No building on roads unless toggled if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; }; }; Bellow it, add this code:
    // No buildings arround safe zones (no-build zones) if(!donn_canbuild) then { _cancel = true; _reason = "\nCannot build on the no-build zone!"; }; //DONN  
    NO-BUILD ZONES 2 - NO SAFE PLACEMENT
    You must have a custom vault_pitch.sqf. On your custom vault_pitch.sqf, search for this code:
    // Make sure vault is not placed on road. if (isOnRoad _vault_location) then { _isOk = true; }; Bellow it, add this code:
    // Make sure vault are not placed arround safe zones (no-build zones) if(!donn_canbuild) then { _isOk = true; }; Search this code more to the end of the file:
    cutText [(localize "str_epoch_player_110"), "PLAIN DOWN"]; Change it to:
    //cutText [(localize "str_epoch_player_110"), "PLAIN DOWN"]; cutText ["You can''t place safes on the roads or no-build zones!", "PLAIN DOWN"];  
    CONFIGURATION ON andre_safezone.sqf
    Search for this code bellow in andre_safezone.sqf, here you need to add the safezones of your map. Default is Chernarus, if you use another map, change it to your safezones.
    donn_traders = [ ["Safe 1",[6325,7807,0],160,500], ["Safe 2",[4063,11664,0],160,500], ["Safe 3",[11447,11364,0],160,500], ["Safe 4",[1606,7803,0],160,500], ["Safe 5",[12944,12766,0],160,500], ["Safe 6",[12060,12640,0],160,500] ]; Each line contain one safe zone: [Name of the Safe, position of the safe, safe zone radius, no-build zone radius] 
    The name of the safezones is just to organize things better, it does not appears on the enter/leave safezone message.
     
    BE FILTERS
    None needed.
  21. Like
    Donnovan reacted to raymix in Why go to Lobby after die?   
    its just how character creation was designed for dayz, not entirely sure why we are still doing it in A3, but I was also curious about this actually, just never bothered to ask, lol
    I'd say there's a good reason for this, but I can't see why normal respawn shouldn't be possible in both games with a bit of elbow grease.
  22. Like
    Donnovan reacted to Tang0 in Andre Safe Zones for Arma 2 (It's good man!)   
    Thank you kind sir i will try that :)
  23. Like
    Donnovan reacted to Tang0 in Andre Safe Zones for Arma 2 (It's good man!)   
    ok, will wait for the update
  24. Like
    Donnovan got a reaction from MatthewK in [Release] Heli Guard on DDOS   
    If this is not of your interest. Sorry. I believe you can ignore. Thankyou.
     
    DDOS HELI GUARD
     
    WHAT THIS DO
    Park your heli if all the crew is sudenly disconected.
     
    WHERE THE HELI IS PARKED?
    If the heli is above a open camp, it will be parked on this camp.
     
    AND IF THE HELI IS ABOVE A CITY OR FOREST?
    So the heli will be parked on the nearest open area.
     
    IF JUST THE PILOT LOST CONNECTION THE HELI WILL BE PARKED?
    No. 
     
    INSTALATION
    1 - Download the script on this link: https://www.dropbox.com/s/8tseh7u8ct6gy49/andre_ddos_heli_guard.sqf?dl=0
    2 - Put the script on the root of your mission folder.
    3 - Open the file init.sqf.
    4 - Put this line at the end of your init.sqf: execVM "andre_ddos_heli_guard.sqf";
     
    BE FILTERS
    On publicvariable.txt add this at the end of the line that begins with 5 "" (usually first or second line):
    !="donn_heli_monitor"
     
    MAKE A TEST 1 - Fly on a Heli as a pilot. 2 - Press Alt + F4 to close the Arma 2 OA client. 3 - Re-join the server. 4 - Look for your Heli. It will be parked.
  25. Like
    Donnovan reacted to Tang0 in MOSTWA - Andre most Wanted Script   
    Alot of great work Donnovan thnx
×
×
  • Create New...