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
Basic Timer - GTA Connected

Basic Timer

Revision as of 18:06, 5 February 2019 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This code adds a message to the chat box every 5 minutes.

Code

JavaScript, Server-Side:

setInterval(function()
{
	message('This message is shown every five minutes!');
}, 5 * 60 * 1000);

Notes

The code uses setInterval, which is a shared function, shared means that the functionality is available both server-side and client-side.