mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
7a074042b1
* 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.
27 lines
601 B
Plaintext
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;
|
|
};
|
|
}; |