DMS_Exile/@ExileServer/addons/a3_dms/scripts/fn_SelectMission.sqf
eraser1 7a074042b1 Important restructuring, minor fix(es)
* CONFIG VALUES: Changed "DMS_MissionTypes" to "DMS_BanditMissionTypes"
* Renamed some variables to "future-proof" them
* Placed all current missions under "bandit" subfolder to for easier
future integration.
* Created function "DMS_fnc_SpawnBanditMission" to handle bandit mission
spawning (makes it easier to spawn missions via admin console).
* Attached vehicle eventhandlers to DMS-spawned non-persistent vehicles.
* Fixed the "lock" option appearing on DMS-spawned vehicles.
2015-09-20 23:42:33 -05:00

27 lines
601 B
Plaintext

/*
DMS_fnc_selectMission
Influenced by WAI
Created by eraser1
Selects/Spawns missions. Takes no arguments, returns nothing.
*/
private "_time";
_time = diag_tickTime;
if (DMS_RunningBMissionCount >= DMS_MaxBanditMissions) then
{
DMS_BMissionLastStart = _time;
};
if (diag_fps >= DMS_MinServerFPS && {(count allPlayers) >= DMS_MinPlayerCount}) then
{
// More Mission types coming soon
if (_time - DMS_BMissionLastStart > DMS_BMissionDelay) then
{
private "_mission";
_mission = DMS_BanditMissionTypesArray call BIS_fnc_selectRandom;
[_mission] call DMS_fnc_SpawnBanditMission;
};
};