mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-23 00:20:50 +03:00
Update server_functions
The protective box is not needed on Chernarus. If other maps need it we are better off spawning a permanent box around the debug area once, instead of constantly creating new boxes every time a player logs in.
This commit is contained in:
22
SQF/dayz_server/compile/spawn_roadblocks.sqf
Normal file
22
SQF/dayz_server/compile/spawn_roadblocks.sqf
Normal file
@@ -0,0 +1,22 @@
|
||||
private ["_position","_veh","_istoomany","_spawnveh"];
|
||||
|
||||
waitUntil {!isNil "BIS_fnc_selectRandom"};
|
||||
_position = RoadList call BIS_fnc_selectRandom;
|
||||
_position = _position modelToWorld [0,0,0];
|
||||
|
||||
waitUntil {!isNil "BIS_fnc_findSafePos"};
|
||||
_position = [_position,0,10,5,0,2000,0] call BIS_fnc_findSafePos;
|
||||
|
||||
if ((count _position) == 2) then {
|
||||
_istoomany = _position nearObjects ["All",5];
|
||||
if ((count _istoomany) > 0) exitWith {};
|
||||
|
||||
waitUntil {!isNil "BIS_fnc_selectRandom"};
|
||||
_spawnveh = DZE_isWreck call BIS_fnc_selectRandom;
|
||||
|
||||
_veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
|
||||
_veh enableSimulation false;
|
||||
_veh setDir round(random 360);
|
||||
_veh setPos _position;
|
||||
_veh setVariable ["ObjectID","1",true];
|
||||
};
|
||||
Reference in New Issue
Block a user