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

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.