Advertisement
emfirst

Untitled

Jan 16th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.67 KB | None | 0 0
  1. #define GET_HUM(x) \
  2. if (x > 0) then {_txtHum = "+" + str(x); }else{ _txtHum = x;};\
  3. _totalHum = _totalHum + x;
  4.  
  5. #define CALL_MsgKill(x)\
  6. MPVEH_MsgKill = [_msg,_speed,MK_lvl];\
  7. MK_lvl = MK_lvl + 1;\
  8. \
  9. if(!isNull _player) then { \
  10. sleep 0.8;\
  11. _clientID publicVariableClient "MPVEH_MsgKill";\
  12. \
  13. PVDZE_plr_HumanityChange = [_player, x, 0.5];\
  14. _clientID publicVariableClient "PVDZE_plr_HumanityChange";\
  15. PVDZE_plr_Save = [_player,(magazines _player),true,true] ;\
  16. publicVariableServer "PVDZE_plr_Save";\
  17. };
  18.  
  19.  
  20. private ["_body","_type","_msg","_clientID","_speed","_player","_getHum","_txtHum","_playerUID","_humanity","_isBandit","_isHero","_dead","_chVeh","_inVehicle","_totalMsg","_distance","_totalHum","_humDead","_tHum","_showTotalMsgZombie","_showTotalMsgBots","_showTotalMsgPeople"];
  21.  
  22. _getPlayerHumanity = {
  23. private ["_kiler","_dead","_DeadBandit","_KillerBandit","_Deadherou","_Dead_kepka","_Killerherou","_Killer_kepka","_DeadHumanity","_KillerHumanity","_kills","_hum"];
  24.  
  25. _kiler = _this select 0;
  26. _dead = _this select 1;
  27.  
  28. _DeadBandit = false;
  29. _KillerBandit = false;
  30. _Deadherou = false;
  31. _Dead_kepka = false;
  32. _Killerherou = false;
  33.  
  34. _Killer_kepka = false;
  35. _DeadHumanity = _dead getVariable["humanity",0];
  36. if (_DeadHumanity <= -5000) then {_DeadBandit = true;};
  37. if (_DeadHumanity >= 5000) then {_Deadherou = true;};
  38. if ((!_DeadBandit) && (!_Deadherou)) then {_Dead_kepka = true;};
  39.  
  40. _KillerHumanity = _kiler getVariable["humanity",0];
  41. if (_KillerHumanity <= -5000) then {_KillerBandit = true;};
  42. if (_KillerHumanity >= 5000) then {_Killerherou = true;};
  43. if ((!_KillerBandit) && (!_Killerherou)) then {_Killer_kepka = true;};
  44.  
  45. if (_DeadBandit) then {
  46. _kills = _kiler getVariable ["banditKills",0];
  47. _kiler setVariable ["banditKills",(_kills + 1),true];
  48. }else{
  49. _kills = _kiler getVariable ["humanKills",0];
  50. _kiler setVariable ["humanKills",(_kills + 1),true];
  51. };
  52.  
  53.  
  54. if (_Deadherou) then {
  55. if (_Killerherou) then {
  56. _hum = -1000;
  57. };
  58. if (_KillerBandit) then {
  59. _hum = -500;
  60. _i = -((_DeadHumanity / 100) * 2);
  61. _hum = round(_hum + _i);
  62. };
  63. if (_Killer_kepka) then {
  64. _hum = -5;
  65. };
  66. };
  67.  
  68. if (_DeadBandit) then {
  69. if (_Killerherou) then {
  70. _hum = 1000;
  71. };
  72. if (_KillerBandit) then {
  73. _hum = 100;
  74. };
  75. if (_Killer_kepka) then {
  76. _hum = 500;
  77. _i = -((_DeadHumanity / 1000) * 4);
  78. _hum = round(_hum + _i);
  79. };
  80. };
  81.  
  82. if (_Dead_kepka) then {
  83. if (_Killerherou) then {
  84. _hum = -500;
  85. };
  86. if (_KillerBandit) then {
  87. _hum = -100;
  88. };
  89. if (_Killer_kepka) then {
  90. _hum = -500;
  91. };
  92. };
  93.  
  94. _hum
  95. };
  96.  
  97. _player = _this select 0;
  98. _type = _this select 1;
  99. _getHum = _this select 2;
  100.  
  101. _showTotalMsgZombie = false; //Отображать итог при убийсве зомби
  102. _showTotalMsgBots = false; //Отображать итог при убийсве ботов
  103. _showTotalMsgPeople = true; //Отображать итог при убийсве людей
  104.  
  105. if (!isPlayer _player) exitWith {};
  106.  
  107. _msg = "";
  108. _txtHum = "";
  109. _totalMsg = "";
  110. _isBandit = false;
  111. _isHero = false;
  112. _chVeh = false;
  113. _inVehicle = false;
  114. _dead = nil;
  115. _humDead = 0;
  116. _totalHum = 0;
  117. _distance = 0;
  118.  
  119. _playerUID = getPlayerUID _player;
  120. _clientID = owner _player;
  121.  
  122. _speed = -1.8;
  123.  
  124. {
  125. if (_playerUID == (getPlayerUID _x)) then {
  126. if (_clientID != (owner _x)) then {
  127. _clientID = owner _x;
  128. _player = _x;
  129. _chVeh = true;
  130. };
  131. };
  132. } forEach playableUnits;
  133.  
  134. if (_type == "player") then {
  135. _dead = _this select 3;
  136. _humDead = _dead getVariable ["humanity",0];
  137.  
  138. if (_humDead >= 5000) then { _isHero = true; }else{ _isBandit = true; };
  139. _distance = floor(_player distance _dead);
  140. };
  141.  
  142. if (isNil "MK_lvl") then { MK_lvl = 0; };
  143.  
  144. /*------------------------------------------------Cообщения об убийстве---------------------------------------------*/
  145.  
  146. _gHum_FirstBlood = -20;
  147. _gHum_Killx2 = -75;
  148. _gHum_Killx3 = -100;
  149. _gHum_Killx4 = -150;
  150. _gHum_Killx5 = -200;
  151. _gHum_Killx6 = -300;
  152. _gHum_inVeh = -55;
  153. _gHum_inHead = -10;
  154.  
  155. // стандарт
  156. _gHum_metr = -125;
  157. //
  158.  
  159. _gHum_m500 = -125;
  160. _gHum_m1000 = -175;
  161. _gHum_m1250 = -200;
  162. _gHum_m1500 = -350;
  163. _gHum_m2000 = -500;
  164.  
  165. if (_type == "player") then { _getHum = [_player,_dead] call _getPlayerHumanity; };
  166.  
  167. GET_HUM(_getHum)
  168.  
  169. /*------------------------------------------------Cообщения об убийстве---------------------------------------------*/
  170. switch _type do {
  171. case "zombie": { //убил зомби
  172. _kills = _player getVariable["zombieKills",0];
  173. _player setVariable["zombieKills",(_kills + 1),true];
  174.  
  175. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Освободитель</t>",_txtHum]; //убил зомби
  176. };
  177. case "player": { //убил игрока
  178. if (_isHero) then {
  179. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Изменник</t>",_txtHum]; //Убил героя
  180. }else{
  181. if (_isBandit) then {
  182. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Законник</t>",_txtHum]; //Убил бандита
  183. }else{
  184. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Жнец</t>",_txtHum]; //Убил бандитa
  185. };
  186. };
  187. };
  188. case "botPlus": { _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Чистильщик</t>",_txtHum]; }; //Боты в +
  189. case "botMin": { _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Ха, получил пулю...</t>",_txtHum]; }; //Боты в -
  190. case "botOther": { _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Ха, получил пулю...</t>",_txtHum]; }; //Особые боты +/-
  191. };
  192. CALL_MsgKill(_getHum)
  193. /*------------------------------------------------------------Ачивки-------------------------------------------------------*/
  194.  
  195. switch _type do {
  196. case "player": {
  197. _countKill = _player getVariable ["CountKill", 0];
  198. _timeKill = _player getVariable ["TimeCKill", time];
  199.  
  200. if ((time - _timeKill) < 120) then {
  201. _player setVariable ["CountKill", (_countKill + 1), true];
  202. }else{
  203. _player setVariable ["CountKill", 1, true];
  204. _player setVariable ["TimeCKill", time, true];
  205. };
  206.  
  207. switch _countKill do {
  208. case 2: {
  209. GET_HUM(_gHum_Killx2)
  210. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Двоих подряд</t>",_txtHum];
  211. CALL_MsgKill(_gHum_Killx2)
  212. };
  213. case 3: {
  214. GET_HUM(_gHum_Killx3)
  215. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Троих подряд</t>",_txtHum];
  216. CALL_MsgKill(_gHum_Killx3)
  217. };
  218. case 4: {
  219. GET_HUM(_gHum_Killx4)
  220. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>4-ых подряд</t>",_txtHum];
  221. CALL_MsgKill(_gHum_Killx4)
  222. };
  223. case 5: {
  224. GET_HUM(_gHum_Killx5)
  225. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>5 Убитых - Непобедимый!</t>",_txtHum];
  226. CALL_MsgKill(_gHum_Killx5)
  227. };
  228. case 6: {
  229. GET_HUM(_gHum_Killx6)
  230. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>6 Убитых - Кто ты?!</t>",_txtHum];
  231. CALL_MsgKill(_gHum_Killx6)
  232. };
  233. };
  234.  
  235. if !(_player getVariable ["FirstBlood", false]) then {
  236. GET_HUM(_gHum_FirstBlood)
  237. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Первая кровь</t>",_txtHum];
  238. _player setVariable ["FirstBlood", true, true];
  239. CALL_MsgKill(_gHum_FirstBlood)
  240. };
  241.  
  242. if (_chVeh) then {
  243. _inVehicle = vehicle _player != _player;
  244.  
  245. if (_inVehicle) then {
  246. GET_HUM(_gHum_inVeh)
  247. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Кармагедон</t>",_txtHum];
  248. CALL_MsgKill(_gHum_inVeh)
  249. };
  250. };
  251.  
  252. if ((_dead getVariable ["deathType", ""]) == "shothead") then {
  253. GET_HUM(_gHum_inHead)
  254. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>В голову</t>",_txtHum];
  255. CALL_MsgKill(_gHum_inHead)
  256. };
  257.  
  258. if (_distance > 500) then {
  259. if (_distance > 1000) then {
  260. if (_distance > 1250) then {
  261. if (_distance > 1500) then {
  262. if (_distance > 2000) then {
  263. _gHum_metr = _gHum_m2000;
  264. if (_distance > 3500) then {
  265. PVDZE_send = [_player,"HackLog","Убийство свыше 3000м"];
  266. publicVariableServer "PVDZE_send";
  267. };
  268. }else{
  269. _gHum_metr = _gHum_m1500;
  270. };
  271. }else{
  272. _gHum_metr = _gHum_m1250;
  273. };
  274. }else{
  275. _gHum_metr = _gHum_m1000;
  276. };
  277. }else{
  278. _gHum_metr = _gHum_m500;
  279. };
  280.  
  281. GET_HUM(_gHum_metr)
  282. _msg = format ["<t size='0.5' color='#EDEE6D'> %1</t> <t size='0.5' color='#088BC9'>Снайпер %2 метров</t>",_txtHum,_distance];
  283. CALL_MsgKill(_gHum_metr)
  284. };
  285.  
  286. };
  287. };
  288.  
  289. /*--------------------------------------------------------------------------------------------------------------------------*/
  290.  
  291. if (((_type == "zombie") && !_showTotalMsgZombie) || ((_type == "player") && !_showTotalMsgPeople) || (((_type == "botPlus") || (_type == "botMin") || (_type == "botOther")) && !_showTotalMsgBots)) exitWith {};
  292.  
  293. if (_totalHum > 0) then {_txtHum = "+" + str(_totalHum);}else {_txtHum = _totalHum;};
  294. _msg = format ["<t size='0.5' color='#500000'> %1</t>",_txtHum];
  295. CALL_MsgKill(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement