function main()
local sampev = require('lib.samp.events')
function sampev.onSendTakeDamage(playerId, damage, weapon, bodypart)
if playerId ~= 65535 then
local myId = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local hp = sampGetPlayerHealth(myId)
if hp <= 40...