onClientPreRender
Client-side
Server-side
Shared
This event is triggered every time before GTA renders a new frame.
Parameters
float timeSlice
- timeSlice: The interval between this frame and the previous one in milliseconds (delta time).
Source
element: The source of this event is the client's root element.
Code Examples
client
This example makes the camera follow the player in a GTA2-like way.
function updateCamera () local x, y, z = getElementPosition ( localPlayer ) setCameraMatrix ( x, y, z + 50, x, y, z )endaddEventHandler ( "onClientPreRender", root, updateCamera )
See Also
Other Events
- onClientChatMessage
- onClientConsole
- onClientCoreCommand
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMTAFocusChange
- onClientMinimize
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound