Kill Effect Help

maineimissantri

Новичок
Автор темы
2
0
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
This is a shot hit script that will come out after hitting the target, I want to change this to an effect when killing the target, not when hitting the target. Because if this is a hit effect, it will really disturb my eyes. Please help how to change this to a killing effect.