SHARE
TWEET

help ?

TimRambo Jul 12th, 2019 18 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. span class="re5"> Code from VASS
  2. diag_log "//________________ GF Killfeed Script _____________";
  3.  
  4.  
  5. addMissionEventHandler ["EntityKilled",
  6. {
  7.     params ["_killed", "_killer", "_instigator", "_useEffects"];
  8.     _money = _killer getVariable [TER_moneyVariable,0];// get the variable, if not defined use default (0)
  9.     _money = _money + 500;//add kill reward
  10.     _killer setVariable [TER_moneyVariable, _money];
  11.     "You received 500$" remoteExec ["hint",_killer];// execute code local on the pc of the killer
  12.     if (isNull _instigator) then {_instigator = _killer}; // player driven vehicle road kill
  13.            
  14.     if (isPlayer _killer) then {
  15.    
  16.     if (_killed isKindOf "CAManBase"           
  17.  
  18. rest of the code
  19. /* 
  20.     //________________  You can filter the side here    ________________
  21.    
  22.     && {((side group _killed) == west ||
  23.          (side group _killed) == east ||
  24.          (side group _killed) == independent ||
  25.          (side group _killed) == civilian)}
  26.        
  27. */     
  28.     )then {
  29.    
  30.     _killed_Name = "";
  31.     _kill_HUD = "";
  32.     _killed_Color = "#99D5FF";
  33.  
  34.     if (!(isplayer _killed)) then {
  35.     _killed_Name = getText (configFile >> "CfgVehicles" >> format["%1",typeOf _killed] >> "Displayname");
  36.     }else{_killed_Name = name _killed};
  37.    
  38.     private _distance = _killer distance2D _killed;    
  39.     private _weapon = getText(configFile >> "CfgWeapons" >> currentWeapon (vehicle _killer) >> "displayname");
  40.     _killed_Color = (side group _killed call BIS_fnc_sideColor) call BIS_fnc_colorRGBtoHTML;
  41.    
  42.     _weapon = currentWeapon _killer;
  43.     _pictureweapon = gettext (configFile >> "cfgWeapons" >> _weapon >> "picture");
  44.     if (_pictureweapon == "") then {
  45.     _weapon = typeOf (vehicle _killer);
  46.     _pictureweapon = (getText (configFile >> "cfgVehicles" >> _weapon >> "picture"));
  47.     };
  48.  
  49.     //________________  1. Player HUD Notification  ________________
  50.     //  https://community.bistudio.com/wiki/BIS_fnc_dynamicText
  51.    
  52.     _kill_HUD = format["<t size='0.5'>Killed  <t size='0.8'> <t color='%1'>  %2  <t color='#FFD700'>  %3 m</t>",_killed_Color,_killed_Name,floor _distance];           
  53.     [_kill_HUD,0,0.3,2,0,0,7017] spawn bis_fnc_dynamicText;
  54.            
  55.     //________________  2. systemChat Notification  ________________
  56.     //  runs on every PC showing kills on global , * You can disable the default arma
  57.     [format["%1  Killed  %2  from  %3 m  with  %4", name player,_killed_Name,floor _distance,_weapon],"systemChat"] call BIS_fnc_MP;
  58.    
  59.     //________________  3. 2 Different notification types   ________________       
  60.     _kill_info = format["<img size='1' shadow='1' image='%1'/>  %2  Killed <t color='%3'>  %4  <t color='#FFD700'> from   %5 m   with  <t color='#FF0000'> %6 </t>",_pictureweapon,name _killer,_killed_Color,_killed_Name,floor _distance,_weapon];   
  61.        
  62.     //________________  1. Hint parsetext   ________________
  63.     //  hintsilent parsetext _kill_info;
  64.    
  65.  
  66.     //________________  2. Left Corner up display   ________________
  67.     _Spawn_kill_info=[["<t size='0.6' align='left' with  %4 >" + _kill_info + "</t>",safeZoneX,safeZoneY,10,0,0,7016] remoteExec ["BIS_fnc_dynamicText"]];
  68.  
  69.     //________________  playSound notification  ________________
  70.     playSound "Killfeed_notification"; 
  71.     };
  72.     };             
  73. }];
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top