Advertisement
Guest User

[GTAV]New function that handle the change to EWO

a guest
Mar 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. void func_7545()
  2. {
  3. int iVar0;
  4. int iVar1;
  5. vector3 vVar2;
  6. var uVar5;
  7.  
  8. iVar0 = (GET_GAME_TIMER() - Global_262145.f_22758); // Gets game timer in milliseconds and subtract 60000
  9. iVar1 = 0;
  10. if (Global_1625995 != -1)
  11. {
  12. if (func_11210(INT_TO_PLAYERINDEX(Global_1625995), 1, 1)) // Checks if the other player is active and playing
  13. {
  14. vVar2 = { GET_ENTITY_COORDS(GET_PLAYER_PED(INT_TO_PLAYERINDEX(Global_1625995)), 1) }; // Get coordinates of the other player
  15. }
  16. }
  17. if (Global_1625995 != -1)
  18. {
  19. if (Global_1625996 != -1)
  20. {
  21. if (Global_1625996 > iVar0)
  22. {
  23. if (!func_42(vVar2))
  24. {
  25. if (GET_DISTANCE_BETWEEN_COORDS(GET_ENTITY_COORDS(PLAYER_PED_ID(), 1), vVar2, true) <= Global_262145.f_22759) // Check if distance between player and other player is 100 or less
  26. {
  27. iVar1 = GET_PLAYER_PED(INT_TO_PLAYERINDEX(Global_1625995)); // Set a value to iVar1
  28. }
  29. }
  30. }
  31. }
  32. }
  33. SET_ENTITY_HEALTH(PLAYER_PED_ID(), 0, iVar1); // Kills the player by setting his health to 0
  34. uVar5 = func_7547(); // Mark it as normal death
  35. if (iVar1 != 0) // If iVar1 has a value then mark the death as kill for other player
  36. {
  37. Global_2436181.f_1777.f_804 = 1;
  38. uVar5 = func_7546(); // Mark it as death caused by other players
  39. func_6440(jooat("mpply_deaths_player_suicide"));
  40. }
  41. else
  42. {
  43. Global_2436181.f_1777.f_804 = 1;
  44. }
  45. _0x428EAF89E24F6C36(uVar5, 1f); // Increase the stat value by one which will increase your deaths by one
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement