TriggerLatentServerEvent: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} This function is the same as triggerServerEvent except the transmission rate of the data contained in the arguments can be limited. ==Syntax== ...") |
No edit summary |
||
Line 15: | Line 15: | ||
*'''bandwidth:''' The bytes per second rate to send the data contained in the arguments. | *'''bandwidth:''' The bytes per second rate to send the data contained in the arguments. | ||
*'''persist:''' A bool indicating whether the transmission should be allowed to continue even after the resource that triggered it has since stopped. | *'''persist:''' A bool indicating whether the transmission should be allowed to continue even after the resource that triggered it has since stopped. | ||
*'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[element]]s. | *'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[element]]s. The total amount of data should not exceed 100MB. | ||
===Returns=== | ===Returns=== |
Revision as of 22:43, 30 December 2012
This function is the same as triggerServerEvent except the transmission rate of the data contained in the arguments can be limited.
Syntax
bool triggerLatentServerEvent ( string event, [int bandwidth=5000,] [bool persist=false,] element theElement, [arguments...] )
Required Arguments
- event: The name of the event to trigger server-side. You should register this event with addEvent and add at least one event handler using addEventHandler.
- theElement: The element that is the source of the event. This could be another player, or if this isn't relevant, use the root element.
Optional Arguments
- bandwidth: The bytes per second rate to send the data contained in the arguments.
- persist: A bool indicating whether the transmission should be allowed to continue even after the resource that triggered it has since stopped.
- arguments...: A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass elements. The total amount of data should not exceed 100MB.
Returns
Returns true if the event trigger has been sent, false if invalid arguments were specified.
Example
--TODO
Requirements
This template will be deleted.
See Also
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled