OnProcess: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 4: Line 4:
|type = event
|type = event
|games = iii vc sa iv
|games = iii vc sa iv
|desc = each processing cycle occurs (sometimes referred to as tick or pulse)
|desc = each processing cycle occurs (sometimes referred to as tick or pulse).
|arg1 = float deltaTime The delta time for this processing cycle, in seconds. 1.0 = 1 second.
|arg1 = float deltaTime The delta time for this processing cycle, in seconds. 1.0 = 1 second.
|cancel = false
|cancel = false
|notes = The delta time is the duration between the current and previous event triggers, in seconds.
|note1 = The delta time is the duration between the current and previous event triggers, in seconds.
|note2 = For the first occurrence of this event triggering, the delta time is the duration between resource initialization and the first processing cycle event.
|exampleLua = addEventHandler("OnProcess", function(event,deltaTime)
|exampleLua = addEventHandler("OnProcess", function(event,deltaTime)
message("Process event occurred.", COLOUR_RED)
message("Process event occurred.", COLOUR_RED)
end)
end)
}}
}}

Latest revision as of 04:44, 26 February 2024

Event Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline Not Cancellable

Available since Server 1.0.0, Client 1.0.0

onProcess(Event event, float deltaTime)

The onProcess event is invoked when each processing cycle occurs (sometimes referred to as tick or pulse).

Parameters

1) Event event The event object for this event.
2) float deltaTime The delta time for this processing cycle, in seconds. 1.0 = 1 second.

Attributes

const This event cannot be cancelled.

Notes

  • The delta time is the duration between the current and previous event triggers, in seconds.
  • For the first occurrence of this event triggering, the delta time is the duration between resource initialization and the first processing cycle event.

Examples

Example 1 - Lua:

addEventHandler("OnProcess", function(event,deltaTime)
    message("Process event occurred.", COLOUR_RED)
end)

Compatibility

There isn't any compatibility information for this event.

Related

Server Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnProcess


Client Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png OnProcess