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

Event

onClientPedsProcessed

ClientBrowserIdentical to MTA:SA

Every frame, right after all peds' animations and bones are updated and before onClientPreRender. Here getPedBonePosition and getPedBoneMatrix return this frame's positions, so manually attached objects and effects do not lag a frame behind.

Handler

addEventHandler("onClientPedsProcessed", root, function() ... end)

Source

source is root.

Example

addEventHandler("onClientPedsProcessed", root, function()
    local x, y, z = getPedBonePosition(localPlayer, 8)
    if x then setElementPosition(halo, x, y, z + 0.3) end
end)

See also