I have a counter script on a website on the Internet and it (shows online on the server in gta) how can I make the counter work without reloading the page?
var ip = "rage2.grand-rp.su:22005";
$.getJSON('https://cdn.rage.mp/master', function(masterlist) {
$.each(masterlist, function(key, result) {
if(key == ip) {
document.getElementById('online').innerHTML = result.players;
return false;
}
});
});