Advertisement
Guest User

killMessage.sqf

a guest
Feb 21st, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.17 KB | None | 0 0
  1. span class="re5"> params [
  2.     ["_unit",objNull,[objNull]],
  3.     ["_killer",objNull,[objNull]]
  4. ];
  5. disableSerialization;
  6.  
  7. /* Custom Deathmessages */
  8. _message = "";
  9. _headshoted = _unit getVariable ["Headshoted",false];
  10. _headshotedBy = _unit getVariable ["HeadshotedBy",objNull];
  11.  
  12. if (!isNull _killer && {_killer != _unit} && {alive _killer}) then {
  13.   if (vehicle _killer isKindOf "LandVehicle") then {
  14.     _message = format ["%1 was killed by %2",_unit getVariable ["realname",name _unit],_killer getVariable ["realname",name _killer]];
  15.   };
  16.   if (_headshoted && _headshotedBy isEqualTo _killer) then {
  17.     _message = format ["%1 was headshoted by %2 with a %3",_unit getVariable ["realname",name _unit],_killer getVariable ["realname",name _killer],(getText(configFile >> "cfgWeapons" >> currentWeapon _killer >> "displayName"))];
  18.   } else {
  19.     _message = format ["%1 was killed by %2 with a %3",_unit getVariable ["realname",name _unit],_killer getVariable ["realname",name _killer],(getText(configFile >> "cfgWeapons" >> currentWeapon _killer >> "displayName"))];
  20.   };
  21. } else {
  22.     _message = format ["%1 committed suicide",_unit getVariable ["realname",name _unit]];
  23. };
  24.  
  25. systemChat _message;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement