Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 43 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. function deathCheck(attacker, attackerweapon, bodypart, loss)
  2. local pHealth = getElementHealth(source)
  3.  
  4.     if (pHealth <=15) and (pHealth >= 5) then
  5.     outputChatBox("*You're near death and will be completely lifeless soon, Type /acceptdeath or await for Medics!", source, 255, 0, 0, false)
  6.     setPedAnimation(source, "ped", "KO_shot_stom", 3000, false, false, false)
  7.     setTimer(setPedAnimation, 3000, 1, source, "ped", "KO_shot_stom", -1, false, false, false)
  8.     addCommandHandler("acceptdeath", killHim)
  9.     setElementData(source, "injured", true)
  10.     end
  11.     if (bodypart == 9 ) then
  12.     killPed(source)
  13.     end
  14. end
  15. addEventHandler("onPlayerDamage", getRootElement(), deathCheck)
  16.  
  17. function killHim(source)
  18. killPed(source)
  19. removeCommandHandler("acceptdeath")
  20. end
  21.  
  22. function checkHp()
  23. local players = getElementsByType("player")
  24. for theKey,thePlayer in ipairs(players) do
  25. if (getElementData(thePlayer, "injured") == true ) then
  26. setElementData(thePlayer, "injured", false)
  27. end
  28. end
  29. end
  30. setTimer(1000, 0, checkHp)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top