ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client events
  3. onClientPlayerHit

Event

onClientPlayerHit

ClientPlayersTrilogy Hub only

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)

See also