Basic Timer

From GTA Connected
Revision as of 18:06, 5 February 2019 by Mex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.