OnElementStreamIn: Difference between revisions
No edit summary |
No edit summary Tag: Manual revert |
||
Line 7: | Line 7: | ||
|arg1 = Element element The element that has streamed in for a client. | |arg1 = Element element The element that has streamed in for a client. | ||
|arg2 = Client client The client that the element has streamed in for. Server-side only. | |arg2 = Client client The client that the element has streamed in for. Server-side only. | ||
|cancel = | |cancel = true | ||
|exampleJSSS = addEventHandler('OnElementStreamIn', (event, element, client) => { | |exampleJSSS = addEventHandler('OnElementStreamIn', (event, element, client) => { | ||
message('Element with id ' + element.id + ' has streamed in for ' + client.name, COLOUR_BLUE); | message('Element with id ' + element.id + ' has streamed in for ' + client.name, COLOUR_BLUE); |
Latest revision as of 12:32, 22 December 2022
Event
Server and Client
Online and Offline
Cancellable
onElementStreamIn(Event event, Element element, Client client)
Parameters
1) | Event | event | The event object for this event. |
2) | Element | element | The element that has streamed in for a client. |
3) | Client | client | The client that the element has streamed in for. Server-side only. |
Attributes
cancellable | This event can be cancelled, by using event.preventDefault. |
Notes
There aren't any notes for this event.
Examples
Example 1 - JavaScript - Server-Side:
addEventHandler('OnElementStreamIn', (event, element, client) => {
message('Element with id ' + element.id + ' has streamed in for ' + client.name, COLOUR_BLUE);
});
Example 2 - JavaScript - Client-Side:
addEventHandler('OnElementStreamIn', (event, element) => {
message('Element with id ' + element.id + ' has streamed in.', COLOUR_BLUE);
});
Example 3 - Lua - Server-Side:
addEventHandler('OnElementStreamIn', function(event, element, client)
message('Element with id ' .. element.id .. ' has streamed in for a client.', COLOUR_RED)
end)
Example 4 - Lua - Client-Side:
addEventHandler('OnElementStreamIn', function(event, element)
message('Element with id ' .. element.id .. ' has streamed in.', COLOUR_BLUE)
end)
Compatibility
There isn't any compatibility information for this event.
Related
Server Related
OnElementDestroy
OnElementStreamIn
OnElementStreamOut
Client Related
OnElementDestroy
OnElementStreamIn
OnElementStreamOut