- Documentation
- Client events
- onClientPlayerHit
Event
onClientPlayerHit
Another player's game reported a hit: a data table with the target element number (target), damage (damage), weapon (w) and body part (bp).
Handler
addEventHandler("onClientPlayerHit", root, function(data) ... end)Parameters
datatable{ target, damage, w, bp }.
Source
source is the player who hit.
Example
addEventHandler("onClientPlayerHit", root, function(data)
outputChatBox(getPlayerName(source) .. " trafił za " .. tostring(data.damage))
end)