Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507
onElementStreamIn - GTA Connected

onElementStreamIn

Revision as of 15:55, 12 August 2021 by MexTest1 (talk | contribs)

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

Available since Server 1.0.0, Client 1.0.0
Server:
function(Event event, Element element, Client client)
Client:
function(Event event, Element element)
The onElementStreamIn event is invoked when an element streams in for a 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) => {
	messageClient('Element with id ' + element.id + ' has streamed in for ' + client.name, client, 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)
	messageClient('Element with id ' .. element.id .. ' has streamed in for a client.', 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