V58 Poptab & Rep gain fix

This commit is contained in:
second_coming 2016-08-10 17:13:33 +01:00
parent 61a8420af6
commit bb0747b48e
2 changed files with 4 additions and 1 deletions

View File

@ -305,7 +305,10 @@ SC_suitablePlayers = [];
_unit disableAI "TARGET";
_unit disableAI "MOVE";
_unitName = ["survivor"] call SC_fnc_selectName;
if(!isNil "_unitName") then { _unit setName _unitName; };
if(!isNil "_unitName") then { _unit setName _unitName; };
// Set money/respect variables
_unit setVariable [ "DMS_AI_Money", missionNamespace getVariable [format ["DMS_%1_%2_MoneyGain",SC_BanditSide,"soldier"],0] ];
_unit setVariable [ "DMS_AI_Respect", missionNamespace getVariable [format ["DMS_%1_%2_RepGain",SC_BanditSide,"soldier"],0] ];
_unit addMPEventHandler ["mpkilled", "_this call SC_fnc_randomUnitMPKilled;"];
_unit addeventhandler ["Fired", {(vehicle (_this select 0)) setvehicleammo 1;}];
};