Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Heya! How could I write a script that...? [closed]

Asked by 5 years ago

How could I write a script that broadcasts a message every 5 minutes telling which team got the most kills and resets the leaderboard? I have kills and deaths (KOs, Wipeouts) stored in a server script. It's for a round type game.

0
SH is not for requests, make an attempt first then ask if you have issues. DinozCreates 1070 — 5y

Closed as Not Constructive by DinozCreates, Gey4Jesus69, User#24403, c0des, Vathriel, and yHasteeD

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
SteamG00B 1633 Moderation Voter
5 years ago
Edited 5 years ago

Since you didn't attempt this first, I'm only going to give you a theory on how to do it.

So basically you need to have a recursive function that waits 5 minutes and then broadcasts a message telling which team got the most kills, then you need to reset the leaderboard, start a new round, and then the function can call itself.

You can mark this as the right solution if it helped you start.

0
you technically don't need to have it be a recursive function, but a for loop would be less elegant for this purpose. SteamG00B 1633 — 5y
Ad