Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void func_8788()
- {
- int iVar0;
- if (Global_1312416.f_6 == 1)
- {
- if (func_12821(PLAYER::PLAYER_ID(), 1, 1))
- {
- if ((func_522() || func_8805()) || STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS())
- {
- func_8801();
- return;
- }
- func_8800();
- func_8798();
- if (!MISC::IS_BIT_SET(Global_2437022.f_1194.f_4, 0) || PED::IS_PED_RAGDOLL(PLAYER::PLAYER_PED_ID()))
- {
- if ((((PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), 0) || func_3595(PLAYER::PLAYER_PED_ID(), 0)) || PED::IS_PED_RAGDOLL(PLAYER::PLAYER_PED_ID())) || ENTITY::IS_ENTITY_IN_AIR(PLAYER::PLAYER_PED_ID())) || !PLAYER::IS_PLAYER_FREE_FOR_AMBIENT_TASK(PLAYER::PLAYER_ID()))
- {
- ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(PLAYER::PLAYER_PED_ID());
- func_8796();
- func_8793();
- func_8792();
- func_8791();
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 5);
- return;
- }
- }
- if (func_8790())
- {
- if (!MISC::IS_BIT_SET(Global_2437022.f_1194.f_4, 0))
- {
- if (((((((((WEAPON::HAS_PED_GOT_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_pistol"), 0) || WEAPON::HAS_PED_GOT_WEAPON(PLAYER::PLAYER_PED_ID(), -1075685676, 0)) && (WEAPON::GET_AMMO_IN_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_pistol")) > 0 || WEAPON::GET_AMMO_IN_PED_WEAPON(PLAYER::PLAYER_PED_ID(), -1075685676) > 0)) && !WEAPON::HAS_PED_GOT_WEAPON_COMPONENT(PLAYER::PLAYER_PED_ID(), joaat("weapon_pistol"), joaat("component_at_pi_supp_02"))) && !func_1899(PLAYER::PLAYER_ID(), 1, 0)) && !func_2058()) && !func_8409(PLAYER::PLAYER_PED_ID())) && !func_1535()) && INTERIOR::GET_ROOM_KEY_FROM_ENTITY(PLAYER::PLAYER_PED_ID()) != MISC::GET_HASH_KEY("YachtRm_Bridge")) && !func_8789())
- {
- if (WEAPON::HAS_PED_GOT_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_pistol"), 0))
- {
- WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_pistol"), true);
- }
- else if (WEAPON::HAS_PED_GOT_WEAPON(PLAYER::PLAYER_PED_ID(), -1075685676, 0))
- {
- WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), -1075685676, true);
- }
- StringCopy(&(Global_2437022.f_1194), "PISTOL", 16);
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 1);
- Global_2437022.f_1194.f_5 = 0.365f;
- }
- else
- {
- WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_unarmed"), true);
- StringCopy(&(Global_2437022.f_1194), "PILL", 16);
- Global_2437022.f_1194.f_5 = 0.536f;
- }
- BRAIN::TASK_PLAY_ANIM(PLAYER::PLAYER_PED_ID(), "MP_SUICIDE", &(Global_2437022.f_1194), 8f, -8f, -1, 270540800, 0, 0, 0, 0);
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 0);
- }
- else if (ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "MP_SUICIDE", &(Global_2437022.f_1194), 3))
- {
- if (!MISC::IS_BIT_SET(Global_2437022.f_1194.f_4, 2))
- {
- if (ENTITY::HAS_ANIM_EVENT_FIRED(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("Fire")))
- {
- ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(PLAYER::PLAYER_PED_ID());
- iVar0 = func_1918(PLAYER::PLAYER_PED_ID());
- if (iVar0 == joaat("weapon_pistol") || iVar0 == -1075685676)
- {
- PED::SET_PED_SHOOTS_AT_COORD(PLAYER::PLAYER_PED_ID(), 0f, 0f, 0f, 0);
- }
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 2);
- }
- }
- if (ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(PLAYER::PLAYER_PED_ID(), "MP_SUICIDE", &(Global_2437022.f_1194)) > Global_2437022.f_1194.f_5)
- {
- PED::SET_PED_TO_RAGDOLL(PLAYER::PLAYER_PED_ID(), 0, 250, 0, 0, 0, 0);
- ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(PLAYER::PLAYER_PED_ID());
- func_8796();
- func_8793();
- func_8792();
- func_8791();
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 5);
- func_8801();
- }
- }
- else
- {
- PED::SET_PED_TO_RAGDOLL(PLAYER::PLAYER_PED_ID(), 0, 250, 0, 0, 0, 0);
- ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(PLAYER::PLAYER_PED_ID());
- func_8796();
- func_8793();
- func_8792();
- func_8791();
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 5);
- func_8801();
- }
- }
- }
- else
- {
- func_8801();
- }
- }
- }
- int func_8789()
- {
- return 0;
- }
- int func_8790()
- {
- STREAMING::REQUEST_ANIM_DICT("MP_SUICIDE");
- if (STREAMING::HAS_ANIM_DICT_LOADED("MP_SUICIDE"))
- {
- return 1;
- }
- return 0;
- }
- void func_8791()
- {
- if (func_5175(PLAYER::PLAYER_ID(), 1))
- {
- MISC::SET_BIT(&(Global_2437022.f_1194.f_4), 4);
- }
- }
- void func_8792()
- {
- struct<14> Var0;
- Var0.f_2 = 554851531;
- Var0.f_10 = PLAYER::PLAYER_ID();
- func_4834(Var0, func_53(0, 1));
- }
- void func_8793()
- {
- int iVar0;
- int iVar1;
- vector3 vVar2;
- var uVar3;
- iVar0 = (MISC::GET_GAME_TIMER() - Global_262145.f_23345);
- iVar1 = 0;
- if (Global_1623793 != -1)
- {
- if (func_12821(PLAYER::INT_TO_PLAYERINDEX(Global_1623793), 1, 1))
- {
- vVar2 = { ENTITY::GET_ENTITY_COORDS(PLAYER::GET_PLAYER_PED(PLAYER::INT_TO_PLAYERINDEX(Global_1623793)), true) };
- }
- }
- if (Global_1623793 != -1)
- {
- if (Global_1623794 != -1)
- {
- if (Global_1623794 > iVar0)
- {
- if (!func_43(vVar2))
- {
- if (MISC::GET_DISTANCE_BETWEEN_COORDS(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), vVar2, true) <= Global_262145.f_23346)
- {
- iVar1 = PLAYER::GET_PLAYER_PED(PLAYER::INT_TO_PLAYERINDEX(Global_1623793));
- }
- }
- }
- }
- }
- ENTITY::SET_ENTITY_HEALTH(PLAYER::PLAYER_PED_ID(), 0, iVar1);
- uVar3 = func_8795();
- if (iVar1 != 0)
- {
- Global_2437022.f_1889.f_804 = 1;
- uVar3 = func_8794();
- func_14842(-1236291856);
- }
- else
- {
- Global_2437022.f_1889.f_804 = 1;
- }
- STATS::_0x428EAF89E24F6C36(uVar3, 1f);
- }
- int func_8794()
- {
- if (func_538() == 1)
- {
- return joaat("mp1_deaths_player");
- }
- return joaat("mp0_deaths_player");
- }
- int func_8795()
- {
- if (func_538() == 1)
- {
- return joaat("mp1_deaths");
- }
- return joaat("mp0_deaths");
- }
- void func_8796()
- {
- if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) > 0)
- {
- if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), 0))
- {
- if (func_1195(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0), 1))
- {
- if (func_966(ENTITY::GET_ENTITY_MODEL(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0)), 0) || func_965(ENTITY::GET_ENTITY_MODEL(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0))))
- {
- func_15191(40);
- func_15192(0, 0, 1, 0, 1, 0, 1);
- }
- else
- {
- func_8797(func_608());
- func_15191(16);
- func_15191(18);
- Global_2437022.f_502.f_21 = 0;
- Global_2437022.f_502.f_11++;
- }
- }
- }
- }
- }
- void func_8797(int iParam0)
- {
- func_1034();
- if (func_1032(iParam0))
- {
- if (!MISC::IS_BIT_SET(Global_1321304[iParam0 /*141*/].f_102, 6))
- {
- MISC::SET_BIT(&(Global_1321304[iParam0 /*141*/].f_102), 6);
- func_1012(29);
- Global_1321304[iParam0 /*141*/].f_103 = func_7095(16, -1);
- if ((((((Global_1321304[iParam0 /*141*/].f_66 == -692292317 || Global_1321304[iParam0 /*141*/].f_66 == -1693015116) || Global_1321304[iParam0 /*141*/].f_66 == 1489874736) || Global_1321304[iParam0 /*141*/].f_66 == -1435527158) || Global_1321304[iParam0 /*141*/].f_66 == -801550069) || Global_1321304[iParam0 /*141*/].f_66 == 679453769) || Global_1321304[iParam0 /*141*/].f_66 == 1909700336)
- {
- Global_1321304[iParam0 /*141*/].f_103 = -999;
- }
- if (func_928(4))
- {
- Global_4263487 = 1;
- }
- else
- {
- func_977(iParam0, &(Global_1321304[iParam0 /*141*/]), 1, -1, 0, 0);
- func_1004(3, 0);
- }
- }
- }
- }
- void func_8798()
- {
- PAD::DISABLE_CONTROL_ACTION(2, 199, 1);
- PAD::DISABLE_CONTROL_ACTION(2, 189, 1);
- PAD::DISABLE_CONTROL_ACTION(2, 190, 1);
- PAD::DISABLE_CONTROL_ACTION(2, 187, 1);
- func_8799();
- }
- void func_8799()
- {
- Global_37026 = 1;
- }
- void func_8800()
- {
- int iVar0;
- int iVar1;
- int iVar2;
- if (PLAYER::IS_PLAYER_CONTROL_ON(PLAYER::PLAYER_ID()))
- {
- BRAIN::CLEAR_PED_TASKS(PLAYER::PLAYER_PED_ID());
- PLAYER::SET_PLAYER_CONTROL(PLAYER::PLAYER_ID(), false, 900);
- PED::SET_PED_STEALTH_MOVEMENT(PLAYER::PLAYER_PED_ID(), 0, 0);
- PLAYER::SET_WANTED_LEVEL_MULTIPLIER(0f);
- func_8798();
- iVar0 = 500;
- if (!NETCASH::_0x7303E27CC6532080(iVar0, 0, 0, 0, &iVar1, -1))
- {
- iVar0 = (iVar0 - iVar1);
- Global_2437022.f_1194.f_6 = 1;
- }
- if (iVar0 > 0)
- {
- if (func_997())
- {
- func_1831(-516219046, iVar0, &iVar2, 0, 0, 0);
- }
- else
- {
- NETCASH::NETWORK_BUY_HEALTHCARE(iVar0, false, false);
- func_1553(-iVar0, 1);
- }
- }
- Global_2423801[PLAYER::PLAYER_ID() /*413*/].f_225 = 1;
- }
- }
- void func_8801()
- {
- if (!func_585(PLAYER::PLAYER_ID()))
- {
- PLAYER::SET_WANTED_LEVEL_MULTIPLIER(1f);
- }
- STREAMING::REMOVE_ANIM_DICT("MP_SUICIDE");
- if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS())
- {
- if (NETWORK::NETWORK_IS_IN_MP_CUTSCENE())
- {
- func_8804(1);
- if (Global_95296)
- {
- func_8802();
- }
- }
- }
- Global_1312416.f_6 = 0;
- StringCopy(&(Global_2437022.f_1194), "", 16);
- MISC::CLEAR_BIT(&(Global_2437022.f_1194.f_4), 0);
- MISC::CLEAR_BIT(&(Global_2437022.f_1194.f_4), 1);
- MISC::CLEAR_BIT(&(Global_2437022.f_1194.f_4), 2);
- MISC::CLEAR_BIT(&(Global_2437022.f_1194.f_4), 3);
- }
- void func_8802()
- {
- CAM::SET_WIDESCREEN_BORDERS(false, -1);
- func_8803();
- if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
- {
- WEAPON::HIDE_PED_WEAPON_FOR_SCRIPTED_CUTSCENE(PLAYER::PLAYER_PED_ID(), false);
- if (!Global_71205)
- {
- PLAYER::SET_EVERYONE_IGNORE_PLAYER(PLAYER::PLAYER_ID(), 0);
- PED::CLEAR_FACIAL_IDLE_ANIM_OVERRIDE(PLAYER::PLAYER_PED_ID());
- }
- }
- Global_95296 = 0;
- func_1440(0, 1, 1, 0, 0);
- }
- void func_8803()
- {
- if (Global_93284.f_5 && Global_93284.f_6 == MISC::GET_HASH_KEY(SCRIPT::GET_THIS_SCRIPT_NAME()))
- {
- HUD::CLEAR_HELP(1);
- Global_93284.f_5 = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement