Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using GTA;
- using GTA.Native;
- namespace Injury0
- {
- public class Injury0 : Script
- {
- //EDITED BY SIRBACKENBART AKA FLEDRON
- //ORIGINAL BY SOB
- public Injury0()
- {
- Tick += OnTick;
- }
- public void OnTick(object sender, EventArgs e)
- {
- String AnimationName = "move_m@generic";
- int MaxArmour = 3;
- int MaxHealth = 36;
- int InjuryPoints = 0;
- int PlayerHealth = Game.Player.Character.Health;
- Random rnd = new Random();
- Function.Call(Hash.SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER, Game.Player.Character, 0);
- Function.Call(Hash.SET_PLAYER_MAX_ARMOUR, Game.Player.Character, MaxArmour);
- //DONT KNOW IF THIS DOES WORK FOR PLAYERS, HAVE TO TEST
- //Function.Call(Hash.SET_PED_MAX_HEALTH, Game.Player.Character, MaxHealth);
- int HState = rnd.Next(0, 9);
- int AState = rnd.Next(0, 9);
- int BState = rnd.Next(0, 9);
- int CState = rnd.Next(0, 9);
- int DState = rnd.Next(0, 9);
- int EState = rnd.Next(0, 10);
- int FState = rnd.Next(0, 10);
- int LState = rnd.Next(0, 10);
- int MState = rnd.Next(0, 10);
- if (Game.Player.Character.Armor > MaxArmour)
- {
- Function.Call(Hash.SET_PED_ARMOUR, Game.Player.Character, MaxArmour);
- }
- if (PlayerHealth > MaxHealth)
- {
- Function.Call(Hash.SET_ENTITY_HEALTH, Game.Player.Character, 136);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- Function.Call(Hash._SET_CAM_EFFECT, 0);
- }
- if (PlayerHealth == MaxHealth)
- {
- AnimationName = "move_m@generic";
- Function.Call(Hash.SET_PED_MOVE_RATE_OVERRIDE, Game.Player.Character, 1.04);
- Function.Call(Hash._SET_CAM_EFFECT, 0);
- Function.Call(Hash.CLEAR_PED_BLOOD_DAMAGE, Game.Player.Character);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- }
- else if (PlayerHealth <= MaxHealth-1 && PlayerHealth >= MaxHealth-2)
- {
- AnimationName = "move_m@gangster@a";
- Function.Call(Hash.SET_PED_MOVE_RATE_OVERRIDE, Game.Player.Character, 1.02);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- Wait(6130); Game.Player.Character.Health = Game.Player.Character.Health + 1;
- Function.Call(Hash._SET_CAM_EFFECT, 0);
- }
- else if (PlayerHealth <= MaxHealth-3 && PlayerHealth >= MaxHealth-4)
- {
- AnimationName = "move_m@drunk@moderatedrunk";
- Function.Call(Hash.SET_PED_MOVE_RATE_OVERRIDE, Game.Player.Character, 1.01);
- Function.Call(Hash._SET_CAM_EFFECT, 0);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- Wait(6330); Game.Player.Character.Health = Game.Player.Character.Health + 1;
- switch (AState)
- {
- case 0: UI.Notify("Large bruise/grazing blow"); Wait(6130); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 1: UI.Notify("Minor bleeding (external)"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 2: UI.Notify("Winded"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 3: UI.Notify("Minor scrapes/contusions"); Wait(10230); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Possible onset of concussion or shock detected"); Wait(12230); Game.Player.Character.Health = Game.Player.Character.Health - 5; break;
- }
- }
- else if (PlayerHealth <= MaxHealth-5 && PlayerHealth >= MaxHealth-6)
- {
- AnimationName = "move_m@drunk@moderatedrunk";
- Function.Call(Hash.SET_PED_MOVE_RATE_OVERRIDE, Game.Player.Character, 0.95);
- Function.Call(Hash._SET_CAM_EFFECT, 1);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- Wait(9130); Game.Player.Character.Health = Game.Player.Character.Health + 1;
- switch (BState)
- {
- case 0: UI.Notify("Large bruise"); Game.Player.Character.Health = Game.Player.Character.Health + 4; break;
- case 1: UI.Notify("Minor bleeding (external)"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 2: UI.Notify("Significant lacerations"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 3: UI.Notify("Minor scrapes/contusions"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Possible onset of concussion or shock detected"); Game.Player.Character.Health = Game.Player.Character.Health - 5; break;
- }
- }
- else if (PlayerHealth <= MaxHealth-7 && PlayerHealth >= MaxHealth-11)
- {
- AnimationName = "move_m@drunk@verydrunk";
- Function.Call(Hash.SET_PED_MOVE_RATE_OVERRIDE, Game.Player.Character, 0.91);
- Function.Call(Hash.SET_PLAYER_SPRINT, Game.Player.Character, false);
- Function.Call(Hash._SET_CAM_EFFECT, 1);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- Wait(3130); Game.Player.Character.Health = Game.Player.Character.Health + 1;
- switch (HState)
- {
- case 0: UI.Notify("Subdural hematoma detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 1: UI.Notify("Moderate bleeding (external) detected"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 2: UI.Notify("Moderate trauma detected"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 3: UI.Notify("Limited limb mobility due to blunt force trauma"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Potential internal injuries or life threatening condition detected"); Game.Player.Character.Health = Game.Player.Character.Health - 6; break;
- }
- Function.Call(Hash.SET_AUDIO_FLAG, "ForceSniperAudio", 0);
- }
- else if (PlayerHealth < MaxHealth-12)
- {
- AnimationName = "move_m@drunk@verydrunk";
- Function.Call(Hash.SET_PLAYER_SPRINT, Game.Player.Character, false);
- Function.Call(Hash.SET_PED_MOVE_RATE_OVERRIDE, Game.Player.Character, 0.94);
- Function.Call(Hash._SET_CAM_EFFECT, 1);
- Function.Call(Hash.SET_AUDIO_FLAG, "ForceSniperAudio", 0);
- Function.Call(Hash.SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER, 0.0f);
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- switch (HState)
- {
- case 0: UI.Notify("Internal injuries (significant)"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 1: UI.Notify("Internal injuries (severe)"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 2: UI.Notify("Sprained or badly damaged limb"); Game.Player.Character.Health = Game.Player.Character.Health + 5; break;
- case 3: UI.Notify("Stabilizing in emergency state"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 4: UI.Notify("Internal bleeding (deadly) detected. Blackout/death imminent"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0x99B507EA, 0, true))
- {
- switch (DState)
- {
- case 0: UI.Notify("Grazing cut through clothing; superficial damage"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 1: UI.Notify("Long shallow cut on extremities; superficial damage"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 2: UI.Notify("Defense wounds to fingers; superficial damage (capability to grasp impaired)"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 3: UI.Notify("Shallow stab wound/defense wounds to extremities; profuse bleeding"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Very painful but shallow cut. Light bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 5: UI.Notify("Stab wound to extremities. Moderate bleeding"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 6: UI.Notify("Deep stab wound detected"); Game.Player.Character.Health = Game.Player.Character.Health - 5; break;
- case 7: UI.Notify("Possible nerve damage/life threatening bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 6; break;
- case 8: UI.Notify("Punctured or collapsed lung detected; potentially fatal injury"); Game.Player.Character.Health = Game.Player.Character.Health - 8; break;
- case 9: UI.Notify("Artery severed"); Game.Player.Character.Health = Game.Player.Character.Health - 12; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0xF9E6AA4B, 0, true))
- {
- switch (DState)
- {
- case 0: UI.Notify("Very light jagged cut through clothing; superficial damage"); Game.Player.Character.Health = Game.Player.Character.Health + 6; break;
- case 1: UI.Notify("Superficial damage; some glass in wound."); Game.Player.Character.Health = Game.Player.Character.Health + 4; break;
- case 2: UI.Notify("Defense wounds to fingers; superficial damage (capability to grasp impaired)"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 3: UI.Notify("Shallow stab wound/defense wounds to extremities; profuse bleeding"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Very painful but shallow cut. Light bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 5: UI.Notify("Stab wound to extremities. Moderate bleeding"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 6: UI.Notify("Deep stab wound detected"); Game.Player.Character.Health = Game.Player.Character.Health - 5; break;
- case 7: UI.Notify("Possible nerve damage/life threatening bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 8: UI.Notify("Punctured or collapsed lung detected; potentially fatal injury"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 9: UI.Notify("A chunk of the bottle breaks off!"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0x92A27487, 0, true))
- {
- switch (DState)
- {
- case 0: UI.Notify("Grazing cut through clothing; superficial damage"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 1: UI.Notify("Long shallow cut on extremities; superficial damage"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 2: UI.Notify("Defense wounds to fingers; superficial damage (capability to grasp impaired)"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 3: UI.Notify("Shallow stab wound/defense wounds to extremities; profuse bleeding"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Very painful but shallow cut. Light bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 5: UI.Notify("Stab wound to extremities. Moderate bleeding"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 6: UI.Notify("Deep stab wound detected"); Game.Player.Character.Health = Game.Player.Character.Health - 5; break;
- case 7: UI.Notify("Possible nerve damage/life threatening bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 6; break;
- case 8: UI.Notify("Punctured or collapsed lung detected; potentially fatal injury"); Game.Player.Character.Health = Game.Player.Character.Health - 8; break;
- case 9: UI.Notify("Artery severed"); Game.Player.Character.Health = Game.Player.Character.Health - 12; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0x1B06D571, 0, true))
- {
- switch (FState)
- {
- case 0: UI.Notify("Grazing puncture through soft tissue only; superficial damage"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 1: UI.Notify("Long shallow GSW on extremities; superficial damage and some bleeding"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 2: UI.Notify("Significant damage from small-caliber GSW"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 3: UI.Notify("Internal bleeding from GSW path"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 4: UI.Notify("Graze injury from richochet/fragment to extremities. Light bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 5: UI.Notify("Through-and-through small caliber gunshot wound to extremities. Moderate bleeding"); Game.Player.Character.Health = Game.Player.Character.Health - 3; break;
- case 6: UI.Notify("Spalling/Fragmentation risk detected; bleeding continues"); Game.Player.Character.Health = Game.Player.Character.Health - 5; break;
- case 7: UI.Notify("Possible nerve damage/life threatening bleeding detected"); Game.Player.Character.Health = Game.Player.Character.Health - 6; break;
- case 8: UI.Notify("Punctured or collapsed lung detected; potentially fatal injury"); Game.Player.Character.Health = Game.Player.Character.Health - 8; break;
- case 9: UI.Notify("Artery severed"); Game.Player.Character.Health = Game.Player.Character.Health - 12; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0xA2719263, 0, true))
- {
- switch (LState)
- {
- case 0: UI.Notify("Very light bruising"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 1: UI.Notify("Possible small-joint strain detected"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 2: UI.Notify("Bruised or fractured pinky finger, left hand"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 3: UI.Notify("Winded from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Injured from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 5: UI.Notify("Stunned from impact"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 6: UI.Notify("Mobility temporarily limited from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 7: UI.Notify("Dazed from blow"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 8: UI.Notify("Major blunt trauma/TBI detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 9: UI.Notify("Blackout possible"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0x4E875F73, 0, true))
- {
- switch (LState)
- {
- case 0: UI.Notify("Very light bruising"); Game.Player.Character.Health = Game.Player.Character.Health + 4; break;
- case 1: UI.Notify("Glancing blow from hammer; bruised extremities"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 2: UI.Notify("Possible concussion"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 3: UI.Notify("Winded from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Injured from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 5: UI.Notify("Stunned from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 6: UI.Notify("Mobility temporarily limited from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 7: UI.Notify("Dazed from blow"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 8: UI.Notify("Major blunt trauma/TBI detected"); Game.Player.Character.Health = Game.Player.Character.Health - 4; break;
- case 9: UI.Notify("Possible broken collarbone detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0x678B81B1, 0, true))
- {
- Game.Player.Character.Health = Game.Player.Character.Health + 1;
- switch (LState)
- {
- case 0: UI.Notify("Very light bruising; glancing blow connected"); Game.Player.Character.Health = Game.Player.Character.Health + 4; break;
- case 1: UI.Notify("Grazing blow past extremities"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 2: UI.Notify("Possible concussion from nightstick detected"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 3: UI.Notify("Winded from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Injured from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 5: UI.Notify("Forearm damaged from nightstick contact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 6: UI.Notify("Mobility temporarily limited from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 7: UI.Notify("Dazed from blow"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 8: UI.Notify("Major blunt trauma/TBI detected"); Game.Player.Character.Health = Game.Player.Character.Health - 4; break;
- case 9: UI.Notify("Possible broken collarbone detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- }
- }
- if (Function.Call<bool>(Hash.HAS_PED_BEEN_DAMAGED_BY_WEAPON, Game.Player.Character, 0x958A4A8F, 0, true))
- {
- switch (LState)
- {
- case 0: UI.Notify("Very light bruising"); Game.Player.Character.Health = Game.Player.Character.Health + 4; break;
- case 1: UI.Notify("Possible small-joint strain detected"); Game.Player.Character.Health = Game.Player.Character.Health + 2; break;
- case 2: UI.Notify("Bruised or fractured pinky finger, left hand"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 3: UI.Notify("Winded from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 4: UI.Notify("Injured from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 5: UI.Notify("Stunned from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 1; break;
- case 6: UI.Notify("Mobility temporarily limited from impact"); Game.Player.Character.Health = Game.Player.Character.Health + 3; break;
- case 7: UI.Notify("Dazed from blow"); Game.Player.Character.Health = Game.Player.Character.Health - 2; break;
- case 8: UI.Notify("Major blunt trauma/TBI detected"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- case 9: UI.Notify("Blackout possible"); Game.Player.Character.Health = Game.Player.Character.Health - 1; break;
- }
- }
- if (Game.Player.Character.IsAlive)
- {
- if (!Function.Call<bool>(Hash.HAS_ANIM_SET_LOADED, AnimationName))
- {
- Function.Call(Hash.REQUEST_ANIM_SET, AnimationName);
- }
- else
- {
- Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET, Game.Player.Character, AnimationName, 1.0f);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement