script_name('effects')
script_author('TwentySixty')
require "lib.moonloader"
local hook = require 'lib.samp.events'
EFFECT = 18724 -- EDIT THIS
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampAddChatMessage("{FF6C22}Hit Effect by {00F240}TwentySixty !", -1)
while true do wait(1) end
end
-- playerId = 'int16', damage = 'float', weapon = 'int32', bodypart = 'int32'
function hook.onSendGiveDamage(playerId, damage, weapon, bodypart)
res, hand = sampGetCharHandleBySampPlayerId(playerId)
if res then
ex, ey, ez = getCharCoordinates(hand)
ef = createObject(EFFECT, ex, ey, ez - 1)
end
end