Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
klinshy committed Aug 30, 2024
1 parent 6c75c7d commit 30bfe95
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,20 @@ async function sendPlayerData(webhookUrl = DEFAULT_WEBHOOK_URL, firstPing = fals
}
}

// Call the function to send player data initially with firstPing=true
sendPlayerData(DEFAULT_WEBHOOK_URL, true);

// Call the function every 60 seconds with firstPing=false
setInterval(() => {
sendPlayerData(DEFAULT_WEBHOOK_URL, false);
}, 60000);
let firstPing = true;

// Call the function to send player data initially with firstPing=true
sendPlayerData(DEFAULT_WEBHOOK_URL, true);
sendPlayerData(DEFAULT_WEBHOOK_URL, firstPing);

// Set firstPing to false after the initial call
firstPing = false;

// Call the function every 60 seconds with firstPing=false
setInterval(() => {
sendPlayerData(DEFAULT_WEBHOOK_URL, false);
sendPlayerData(DEFAULT_WEBHOOK_URL, firstPing);
}, 60000);

}});
////////////////////////////////////////////////
WA.onInit().then(() => {
if (WA.player.tags.includes("admin")) {
Expand All @@ -104,7 +103,7 @@ WA.onInit().then(() => {
WA.player.setOutlineColor(255, 255, 0); // Gelb
}
});
}});

WA.onInit().then(async () => {
// Check if the player has the "admin" tag
const playerName = WA.player.name;
Expand Down

0 comments on commit 30bfe95

Please sign in to comment.