Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. //_bambiPlayer addMPEventHandler ["MPKilled", {_this call ExileServer_object_player_event_onMpKilled}]; //Changed this to below
  2. _bambiPlayer addEventHandler
  3. ["MPKilled",
  4. {
  5.  
  6. _player = _this select 0;
  7. _lastEnemy = _player getVariable "LastEnemy"; //This identifies the last enemy that damaged the player
  8.  
  9. if(_lastEnemy != ObjNull)then
  10. {
  11. [_this,_lastEnemy] call ExileServer_object_player_event_onMpKilled;
  12. };
  13. }
  14. ];
  15. _bambiPlayer addMPEventHandler ["HandleDamage", {_this call ExileServer_object_player_event_onHandleDamage}];
  16.  
  17. /**********************************************************************/
  18. //THIS IS ExileServer_object_player_event_onHandleDamage.sqf
  19.  
  20. private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"];
  21. _unit = _this select 0;
  22. _selectionName = _this select 1;
  23. _amountOfDamage = _this select 2;
  24. _sourceOfDamage = _this select 3;
  25. _typeOfProjectile = _this select 4;
  26.  
  27.  
  28. _unit setBleedingRemaining 90;
  29. if(_sourceOfDamage != ObjNull) then
  30. {
  31. _unit setVariable ["LastEnemy", _this select 3]; // This identifies the last source of damage and sets a variable against the player "LastEnemy"?
  32.  
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement