• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Nice and easy way to script a countdown?
#2
I've been doing it like this:

Code:
timer Countdown[1000](playerid, seconds)
{
    if (seconds) {
        defer Countdown(playerid, --seconds);
        // Update GameText, be aware that seconds is already subtracted by 1
    }
    else {
        // Timer finished, code;
    }
}
Dunno if it's the best way but I hope that I gave you a good idea how :3
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Messages In This Thread
RE: Nice and easy way to script a countdown? - by Pinch - 2021-01-12, 11:19 PM

Forum Jump: