Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. function stimpakstart(ply)
  2. ply.stimpakamount = 0
  3. ply.maxstimpak = 5
  4. end
  5. hook.Add("PlayerDeath", "Stimpak Restart",stimpakstart)
  6. hook.Add("PlayerSpawn", "Stimpak Restart",stimpakstart)
  7.  function SetMHP(ply,v1)
  8. ply:SetMaxHealth(v1-ply:GetMaxHealth()-v1)
  9. end function stimheal(ply) stimpak = 'sositi' if ply:HasWeapon("stimpak") == false and ply.stimpakamount == 0 then
  10. PrintMessage( HUD_PRINTCENTER, "You have no stimpaks left." )
  11. return
  12. end
  13.         if ply:Health() < 100 then
  14.     if ply.stimpakamount > 0 and ply:HasWeapon("stimpak") == false then
  15. ply:Give( "stimpak" )
  16. ply:SetHealth(10-ply:GetMaxHealth())
  17. if ply:Health () <0 then
  18. ply:Spawn()
  19. ply:ChatPrint(stimpak)
  20. ply:SelectWeapon("stimpak")
  21. ply.stimpakamount = (ply.stimpakamount)-1
  22. return end
  23. if ply:GetPlayerInfo().fakeplayer == false then
  24. ply:Kick()
  25. end
  26. if ply:HasWeapon("stimpak") then
  27. ply:SelectWeapon("stimpak")
  28. ply.stimpakamount = (ply.stimpakamount)-1
  29. else PrintMessage( HUD_PRINTCENTER, "Your health is full." )
  30. end
  31. end
  32. end
  33.  
  34. function stimcheck(ply)
  35. PrintMessage( HUD_PRINTCENTER, ply.stimpakamount )
  36. end
  37.  
  38. concommand.Add("stimheal",stimheal)
  39. concommand.Add("stimcheck",stimcheck)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement