-
Posts
2098 -
Joined
-
Last visited
-
Days Won
144
Content Type
Profiles
Forums
Articles
Posts posted by juandayz
-
-
TNks for share mate! Keep working on new stuff!
-
Just now, _Lance_ said:
Yes you made it clear thanks I appreciate that :D
I set it like this:
_target = [6326,7808,0]; //use a center coord
_nodamage_ratio=25000;Which will hopefully make all houses on the map indestructible. I'm testing tonight at downtime, about 3.5 hours from now. I'll report back and let you know how it went, thanks a ton man I appreciate it.
If u wanna made all maps build indestructibles.. i think the center coord iS 0,0,0.. for each map or maybe
'center'
_target = 'center'; _nodamage_ratio=20000; _server_houses= _target nearObjects ["HouseBase", _nodamage_ratio]; { _x addEventHandler ["handleDamage", {false}]; } forEach _server_houses;
-
Just now, _Lance_ said:
Sorry I thought I had turned on notifications - would this could affect all in-game buildings and nothing else? Say if I set the coordinates to stary sobor and made the damage radius/ratio 20km (hope I'm reading the code correctly) that would only affect buildings in that radius and no other objects right?
yes, i use this code for damage "HouseBase" in a X ratio from X coords... not for not allow damage.. but you can try.
QuoteSay if I set the coordinates to stary sobor and made the damage radius/ratio 20km
Note that 20 is meters not Km. 20Km should be 20.000.
For example: Map houses do not take damage in a ratio of 800mts around stary trader.
_target = [6325,7807,0];//stary trader coord _nodamage_ratio=800; _server_houses= _target nearObjects ["HouseBase", _nodamage_ratio]; { _x addEventHandler ["handleDamage", {false}]; } forEach _server_houses;
-
@Robert261171 try put a boat vehicle over the water. then for example you will get this code:
_vehicle_51 = objNull; if (true) then { _this = createVehicle ["BOAT", [6324.395, 7805.1362, -6.1035156e-005], [], 0, "CAN_COLLIDE"]; _vehicle_51 = _this; _this setPos [6324.395, 7805.1362, -6.1035156e-005]; };
then take the Z coord.
6324.395, 7805.1362, -6.1035156e-005
and use it for all your bridges.
_vehicle_51 = objNull;
if (true) then
{
_this = createVehicle ["BRIDGE", [6324.395, 7805.1362,-6.1035156e-005], [], 0, "CAN_COLLIDE"];
_vehicle_51 = _this;
};_vehicle_52 = objNull;
if (true) then
{
_this = createVehicle ["BRIDGE", [6338.752, 7793.8716,-6.1035156e-005], [], 0, "CAN_COLLIDE"];
_vehicle_52 = _this;
}; -
anyway i know.. any objects over the water never get save well. so maybe you will need correct his pos using note ++. So maybe you can place anykind of object that take the correct position over the water.. and take his Z coord .. and paste this in bridge Z coords
-
Just now, Robert261171 said:
can never get it level with the ground and yes as I save it the position is gone
place one single part of the bridge and use Alt key to risedown .. then save it. check his pos and correct it again,. save it again.. and again until the bridge take the correct position.
-
well you can place a map addon.. for example a satellital radio near from coast. and through fn_selfactions.sqf add a scroll menu action on this sattelital radio "call boat".
then this "call boat" spawn a Ai and a boat. who wait for nearest players inside a boat and start his waypoint to the other coast.
-
Just now, Robert261171 said:
Ive tried it but with no luck, but I will keep trying...lol
what is exactly the problem? you miss the original position after save it? you cannot move it?
-
you also can spawn an Air or water transport for your players. An Ai driving a boat or heli from coast to coast.
But for the bridge is like hooty said. object by object, step by step. Or maybe thers a tool in armaholic to build bridges. Iknow about fence generators and roads generators.
-
SOunds like rocky movie. The guy who comes from deep down and was the number one. Later whe lost everything.but not his spirit to keep fighting. Anyway glad to know you have your server again mate
-
Just now, leegreaves said:
I have several scripts being called...should i add them one by one until i come across what is causing the hive not to kick in. In meantime im gonna try [] execVM instead of execVM. But thanks anyway!
calling a map addon with server_functions.sqf or server_monitor.sqf
example.sqf (dayz_server.pbo\maps\)
Spoilerif (isServer) then { _vehicle_9 = objNull; if (true) then { _this = createVehicle ["HeliHEmpty", [5408.3813, 3825.3184, 1.5258789e-005], [], 0, "CAN_COLLIDE"]; _vehicle_9 = _this; _this setPos [5408.3813, 3825.3184, 1.5258789e-005]; }; _vehicle_10 = objNull; if (true) then { _this = createVehicle ["Land_Table_EP1", [5418.8921, 3812.2117, -0.06759686], [], 0, "CAN_COLLIDE"]; _vehicle_10 = _this; _this setDir -91.545029; _this setPos [5418.8921, 3812.2117, -0.06759686]; }; };
Using Server_functions.sqf
1-server_functions.sqf (at very bottom)
call compile preProcessFileLineNumbers "z\addons\dayz_server\maps\example.sqf";
Using server_monitor.sqf
1-calling a map addon with server_monitor.sqf (at very bottom)
execVM "\z\addons\dayz_server\maps\example.sqf";
-
Just now, TheBillsProject said:
I have the same issue but with custom vehicles. Where do I put what you said above to fix the issue.
If ure spawning vehicles by server side use the line from above. If ure using this veh by client..example spawn a bike with right click action then add the veh id into dze safevehicle variable.
Example:
1-Server side like kingpapawa case:
veh.sqf
Spoilerif (isServer) then { _vehicle_1 = objNull; if (true) then { _this = createVehicle ["BAF_Offroad_W", [5420.7915, 3807.813, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_1 = _this; _this setDir 110.14845; _this setPos [5420.7915, 3807.813, -3.0517578e-005]; dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_this]; }; _vehicle_2 = objNull; if (true) then { _this = createVehicle ["HMMWV_M2_DZ", [5420.7915, 3807.813, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_2 = _this; _this setDir 110.14845; _this setPos [5420.7915, 3807.813, -3.0517578e-005]; dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_this]; }; };
Example 2: server side (spawning an heli with a epoch event)
Spoiler_carrier = createVehicle [_plane_class, [(_positionp select 0) + 50, (_positionp select 1) + 50],[], 0, "FLY"]; _carrier setVehicleVarName "heli"; _carrier setFuel 1; _carrier engineOn true; _carrier setVehicleAmmo 1; _carrier flyInHeight 150; _carrier limitSpeed 60; _carrier setVehicleLock "LOCKED"; dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_carrier];//heres the line
Example 3: client. (add a vehicles in server spawns and locals scripts)
custom variables.sqf
at bottom add:
SpoilerDZE_myVeh = ["BAF_Offroad_W","HMMWV_M2_DZ"]; DZE_safeVehicle = DZE_myVeh +["ParachuteWest","ParachuteC"];
and into: \@DayZ_Epoch_Server\addons\dayz_server\system\dynamic_vehicle.sqf
SpoilerAllowedVehiclesList = [ ["BAF_Offroad_W",_Ratio3], ["HMMWV_M2_DZ",_Ratio1], //the rest of default vehicles
And for understand all of this.. check this file: \@DayZ_Epoch_Server\addons\dayz_server\system\scheduler\sched_safetyVehicle.sqf
Spoilersched_safetyVehicle = {
{
if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
diag_log [ __FILE__, "KILLING A HACKER", name _x, " IN ", typeOf vehicle _x ];
(vehicle _x) setDamage 1;
_x setDamage 1;
};
} forEach allUnits;objNull
};So now you know about this file.. other way is create a variable for custom vehicles.. then you dont need add the obj monitor line or entry his id in DZE_safevehicle.
Ok:
first open the sched_safetyVehicle.sqf
and replace the whole code by this one:
Spoilersched_safetyVehicle = { { if (vehicle _x != _x && !(vehicle _x in dayz_serverObjectMonitor) && !((typeOf vehicle _x) in DZE_safeVehicle)) then { if (vehicle _x getVariable ["itsnotahacker",0] == 1) exitWith { }; diag_log [ __FILE__, "KILLING A HACKER", name _x, " IN ", typeOf vehicle _x ]; (vehicle _x) setDamage 1; _x setDamage 1; }; } forEach allUnits; objNull };
Now in the file that youre creating the vehicle.. add the variable.. gonna take the first example that i give you:
veh.sqf
Spoilerif (isServer) then { _vehicle_1 = objNull; if (true) then { _this = createVehicle ["BAF_Offroad_W", [5420.7915, 3807.813, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_1 = _this; _this setDir 110.14845; _this setPos [5420.7915, 3807.813, -3.0517578e-005]; _this setvariable ["itsnotahacker",1,true]; }; _vehicle_2 = objNull; if (true) then { _this = createVehicle ["HMMWV_M2_DZ", [5420.7915, 3807.813, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _vehicle_2 = _this; _this setDir 110.14845; _this setPos [5420.7915, 3807.813, -3.0517578e-005]; _this setvariable ["itsnotahacker",1,true]; }; };
-
DOnt know if is the same but i allways have the same issue with my test server. Just crash after 5 8 minutes. I just create a new windows user acount and server stop to crash.
-
try use this code
server_house_noDam.sqf
Spoiler_target = [0,0,0];//use a center coord _nodamage_ratio=8000; _server_houses= _target nearObjects ["HouseBase", _nodamage_ratio]; { _x addEventHandler ["handleDamage", {false}]; } forEach _server_houses;
init.sqf
Spoilerat bottom add:
[] execVM "YourPath\server_house_noDam.sqf";
-
mmm
maybe:
_hastools = ["ItemKnife"] call player_hasTools; _hasitems1 = ["ItemAntibiotic"] call player_checkItems; _hasitems2 = ["ItemAntibacterialWipe"] call player_checkItems; if (call {_hastools} && {_hasitems1} && {_hasitems2}) then {};
or:
_hastools = ["ItemKnife"] call player_hasTools; _hasitems1 = ["ItemAntibiotic","ItemAntibacterialWipe"] call player_checkItems; if (call {_hastools} && {_hasitems1} ) then {};
or:
_inventory = items player; _hastools = "ItemKnife" in _inventory;
or:
if (("ItemAntibiotic" in magazines player) && ("ItemAntibacterialWipe" in magazines player)) then{};
or if u need check current weapons and items:
_Gun = currentWeapon player; if ((_Gun in ["revolver_EP1","revolver_gold_EP1"]) && ("ItemAntibiotic" in magazines player) && ("ItemAntibacterialWipe" in magazines player))then{};
Or you can use negatives.. to exit from the script early:
if !(("ItemAntibiotic" in magazines player) && ("ItemAntibacterialWipe" in magazines player)) exitWith{};
_inventory = items player; _hastools = "ItemKnife" in _inventory; if (!_hastools) exitWith{};
and that is all i know about it.. maybe thers others ways.
-
@gernika do you say something like...
///structure// _VariableName = [["Item ID",Amount],["Item ID",amount]] call player_removeItems; ///////////// _remove= [["CinderBlocks",2],["ItemBloodbag",3]] call player_removeItems;
and if u need check if players have this items:
_hasitem = [["CinderBlocks",2], ["ItemBloodbag",3]] call player_checkItems;
-
Just now, Thug said:
I also started adding in other planes. So far
"A10","Su25_CDF","AN2_DZ" working great
Yup u can add any kind of flying veh since the line about obj monitor was added.
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_aircraft];
This prevent the veh sched destroy your veh cuz is not signed . I say flying veh cuz cannot imagine landveh in this script. Explain it before cleandirella comes to say me you can add anykind of veh.
-
-
1 minute ago, BigEgg said:
We all appreciate you helping people Juan, not what I am saying at all. All I am saying is if you want to help people, use your own code to help them. Not knowing the authors can discredit people who put a lot of time into writing their stuff.
Know youre right mate. This is why i remove the code..and that is why i put is not my code.. and i know sometime my primitive english can be sound offensive..and others times i just wanna be offensive. But not in this case.
-
Just now, BigEgg said:
What? There is a very simple courtesy thing: If it isn't your. s, don't offer it up, s it isn't yours to do so.
I know .just think was your own code.. found it ..dont know who is the owner. Anyway Just was a bunch of code to trow an idea.
-
35 minutes ago, BigEgg said:
If it isn't your code, why are you posting it??
Ok gonna remove it if u wanna sell it
-
Spoiler
private ["_loot","_txt","_cntMax","_step","_loot2","_loot3","_loot4","_loot_lists","_boxtype","_cnt","_playerPos","_box","_curWep","_inVehicle","_done","_excluded","_coins","_vehicle"]; _cntMax = 2; _stepa = 5; _step = 160; _cnt = 1; _done = false; _loot_lists = [ [ ["ChainSawR","ItemSledge","ItemPickaxe"], ["MortarBucket","MortarBucket","bulk_ItemSodaCokeFull","bulk_ItemWire","bulk_PartGeneric","PartPlywoodPack","PartPlankPack","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","PartGeneric"] ], [ ["ItemKeyKit"], ["ItemAntibiotic","ItemBandage","ItemAntibacterialWipe","ItemMorphine","ItemPainkiller","equip_string","equip_gauze","equip_gauzepackaged","equip_rag","equip_herb_box","ItemGoldBar10oz"] ], [ ["ItemHatchet","ItemMachete","ItemPickaxe","ItemSledge"], ["ItemRuby","ItemMixOil","plot_pole_kit","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz","ItemGoldBar10oz"] ], [ ["ChainSaw"], ["ItemDesertTent","ItemGenerator","equip_brick","equip_duct_tape","equip_rope","equip_hose","equip_lever","equip_nails","equip_metal_sheet","equip_1inch_metal_pipe","equip_2inch_metal_pipe","ItemWire","ItemTankTrap","ItemCorrugated","ItemPole"] ], [ ["MP5_DZ"], ["ItemComboLock","ItemVault","ItemLockBox"] ], [ ["DMR_DZ"], ["ItemAntibiotic","ItemAntibacterialWipe","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR"] ], [ ["m107_DZ"], ["10Rnd_127x99_m107","10Rnd_127x99_m107","50Rnd_127x107_DSHKM","MortarBucket","MortarBucket","MortarBucket","MortarBucket","MortarBucket","MortarBucket","transfusionKit","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"] ], [ ["SVD_DZ"], ["PartWheel","PartWheel","PartWheel","PartGlass","PartGlass","PartGlass","PartEngine","PartEngine","PartVRotor","PartVRotor","PartFueltank","PartFueltank","ItemFuelcan","ItemFuelcan","ItemJerrycan","ItemJerrycan","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks","CinderBlocks"] ] ]; _loot = _loot_lists call BIS_fnc_selectRandom; _loot2 = _loot_lists call BIS_fnc_selectRandom; _loot3 = _loot_lists call BIS_fnc_selectRandom; _loot4 = _loot_lists call BIS_fnc_selectRandom; _boxtype = "USOrdnanceBox"; uiSleep 0.5; _txt = "<br/><t size='0.7' color='#ea2828' align='center'>CAPTURE POINT AREA</t>"; [_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText; uiSleep _stepa; // Wait for first Reward // === while {!_done} do { if (_cnt < _cntMax) then { uiSleep _step; _cnt = _cnt + 1; _done = _cnt >= _cntMax; }; }; if (_done) exitWith { _txt = "<br/><t size='0.5' color='#4cea28' align='center'>NICE!HOLD POSITION IS OVER... YOU DID IT!</t>"; [_txt, [safezoneX, safezoneW], [0.10 * safezoneH + safezoneY, 0.2 * safezoneH], 5, 0.5] spawn BIS_fnc_dynamicText; _playerPos = getPos player; _box = _boxtype createVehicle _playerPos; clearweaponcargoglobal _box; clearmagazinecargoglobal _box; { _box addWeaponCargoGlobal [_x,1]; } forEach (_loot select 0); { _box addMagazineCargoGlobal [_x,1]; } forEach (_loot2 select 1); { _box addWeaponCargoGlobal [_x,1]; } forEach (_loot3 select 0); { _box addMagazineCargoGlobal [_x,1]; } forEach (_loot4 select 1); };
-
Just now, Hooty said:
Would this work with a building as well I assume it would.
yup
-
For example i use dynamics safezones in nuclear wars mod. With the event spawn a trader AI. and in a custom player_traderCity.sqf at top i add this condition:
_playerPos = getPos player; _neartrader = count nearestObjects [_playerPos, ["RU_Priest","Profiteer4"], 100] >0; if (!_neartrader) exitWith{};
then if player enter to the safezone and thers no RU_Priest or Profiteer4.. thers no safezone script. but when the event spawns the traders then the safezones are enabled.
New Base Preview
in A2: Custom Bases
Posted
Glad to see people working on new stuff. Best whish for your project mate!! And just an idea..you can randomize this place..i mean make two or more diferents versions and change in each server restart. Good luck