Advertisement
Guest User

Untitled

a guest
Sep 7th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. local oldhp = tonumber(player:get_attribute("hp:hp"))
  2. local newhp = 0
  3. hp_change = tonumber(hp_change)
  4.  
  5. if hp_change <= 0 then
  6. newhp = oldhp - hp_change
  7. else
  8. newhp = oldhp + hp_change
  9. end
  10.  
  11. minetest.log("action",name.." -> "..newhp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement