Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Optional No Gear on Run Over AI
Browse files Browse the repository at this point in the history
  • Loading branch information
SMVampire committed Feb 3, 2014
1 parent e93d22a commit 5fd7e89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
11 changes: 9 additions & 2 deletions DZMS/DZMSConfig.sqf
@@ -1,20 +1,27 @@
/*
DayZ Mission System Config by Vampire
DZMS: https://github.com/SMVampire/DZMS-DayZMissionSystem
*/

//Do you want your players to gain humanity from killing mission AI?
DZMSMissHumanity = true;

//How Much Humanity?
DZMSCntHumanity = 25;

//Do you want AI kills to count as bandit kills?
DZMSCntBanditKls = true;

//Do you want AI that players run over to not have gear?
DZMSRunGear = false;

//How long before bodies disappear? (in seconds) (default = 2400)
DZMSBodyTime = 2400;

//You can adjust the weapons that spawn in weapon crates inside DZMSWeaponCrateList.sqf

//Do you want vehicles from missions to save to the Database? (this means they will stay after a restart)
//If False, vehicles will disappear on restart.
//If False, vehicles will disappear on restart. It will warn a player who gets inside of a vehicle.
DZMSSaveVehicles = false;

/*
Expand Down
17 changes: 16 additions & 1 deletion DZMS/Scripts/DZMSAIKilled.sqf
Expand Up @@ -13,6 +13,8 @@ _player = _this select 1;
if (isPlayer _player) then {
private ["_banditkills","_humanity"];

//diag_log format ["[DZMS]: Debug: Unit killed by %1 at %2", _player, mapGridPosition _unit];

//Lets grab some info
_humanity = _player getVariable ["humanity",0];
_banditkills = _player getVariable ["banditKills",0];
Expand All @@ -34,8 +36,21 @@ if (isPlayer _player) then {
_x reveal [_player, 4.0];
}
} forEach allUnits;

} else {

//diag_log format ["[DZMS]: Debug: Unit killed by %1 at %2", _player, mapGridPosition _unit];

if (DZMSRunGear) then {
//Since a player ran them over, or they died from unknown causes
//Lets strip their gear
clearWeaponCargoGlobal _unit;
clearMagazineCargoGlobal _unit;
removeBackpack _unit;
};

};

//Dead body timer and cleanup
sleep 2400;
sleep DZMSBodyTime;
deletevehicle _unit;

0 comments on commit 5fd7e89

Please sign in to comment.