Hello everyone. I have a question about strange situation with onPlayerWasted event.
addEventHandler( "onPlayerWasted", getRootElement( ),
function(ammo,killer,weapon,bodypart)
if killer and getElementType(killer) == "player" then
outputChatBox("PLAYER")
local faction = tonumber(getElementData(killer,"faction"))
if faction and isFactionActiveWar(faction) then
addKillToGangWar(faction)
end
end
end
)
When player killed by shot in the head, killer type is boolean, but if shot was in the body, killer is player.
Idk how to fix it and why this event returnes thet exception result