OnClientPedsProcessed: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 10: | Line 10: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | |||
addEventHandler("onClientPedsProcessed",root,function() -- add the event | |||
for i,v in ipairs(getElementsByType('player',root,true)) do -- loop all players | |||
-- just an exmaple anim | |||
setElementBoneRotation(v, 33, 0, 295.2, 0) | |||
setElementBoneRotation(v, 23, 0, 298.8, 0) | |||
setElementBoneRotation(v, 4, 0, 46.8, 0) | |||
setElementBoneRotation(v, 2, 0, 0, 32.4) | |||
updateElementRpHAnim(v) -- Update ped bones animations | |||
end | |||
end) | |||
</syntaxhighlight> | |||
==Requirements== | ==Requirements== |
Revision as of 01:36, 12 December 2023
This event is triggered after GTA updates bone transformations for all peds. This event can be used for updating bones.
Parameters
None.
Source
The source of this event is the client's root element.
Example
addEventHandler("onClientPedsProcessed",root,function() -- add the event for i,v in ipairs(getElementsByType('player',root,true)) do -- loop all players -- just an exmaple anim setElementBoneRotation(v, 33, 0, 295.2, 0) setElementBoneRotation(v, 23, 0, 298.8, 0) setElementBoneRotation(v, 4, 0, 46.8, 0) setElementBoneRotation(v, 2, 0, 0, 32.4) updateElementRpHAnim(v) -- Update ped bones animations end end)
Requirements
This template will be deleted.
Warning
This event will trigger whatever function it is attached to with every frame. Depending on the server's maximum FPS and what your computer might handle - you might end up triggering the function 30-60 times per second.
As a result, this event may cause severe lag and/or even crashes if not used cautiously.
See Also
Game Processing Order
Other client events
- onClientChatMessage
- onClientConsole
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMinimize
- onClientMTAFocusChange
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled