Advertisement
TAW_Lucky

WhoKilledCiv v2

Mar 28th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.26 KB | None | 0 0
  1. span class="re5"> Deaths = 0;
  2. //addMPEventHandler ["MPKilled",{hint format ["%1 was killed by %2",name (_this select 0),profileName (_this select 1)];}];
  3. //addMPEventHandler ["MPKilled", {params ["_killed", "_killer"];
  4. addMissionEventHandler ["EntityKilled", {params ["_killed", "_killer", "_instigator"];
  5. //hint str _instigator;
  6. //hint "test 1" + str player;
  7.  
  8. //if ((_instigator isEqualTo player)) then {
  9.  if (_killed isKindOf "Man" && {side group _killed isEqualTo CIVILIAN}) then {
  10.   hint name _killer;
  11.   _killer = profileName;
  12.  
  13.   if ((_instigator) == (_killer)) then {
  14.    hint format ["%1 matches %2", _killer, name player];
  15.    
  16.    
  17.    
  18.   };
  19.   //_instigator = profileName;
  20.  
  21.   Deaths = (Deaths + 1);
  22.   format ["Player %1 killed a civilian", _killer] remoteExec ["systemChat"];
  23.   format ["Civilians killed: %1", str Deaths] remoteExec ["systemChat"];
  24.   [ [ ["<t color='#ff1111' underline = '1'>" + _killer + "</t>"], ["Civilians killed: " + str Deaths], ["Stop shooting the civs!", "<t align = 'center' shadow = '1' size = '0.7' font='puristaMedium'>%1</t>", 30] ] , .7, 0.75, "<t align = 'center' shadow = '1' size = '1.0'>%1</t>" ] remoteExec ["BIS_fnc_typeText"];
  25.   if (Deaths >= 10) then {
  26.    ["epicFail",false,2] remoteExec ["BIS_fnc_endMission"];
  27.   };
  28.  };
  29. //};
  30. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement