Code par Jacob (du forum sa-mp) :
Avant main();
new countdown=0;
new COUNTDOWN_TIMER;
new test;
N'import où
public COUNTDOWN()
{
countdown++; // add one
if (countdown >= 4)
{
countdown = 0;
SendClientMessageToAll(COLOR_WHITE, "GO!!!!");
KillTimer(COUNTDOWN_TIMER);
} else {
format(test, sizeof(test), "%i...", countdown);
SendClientMessageToAll(COLOR_WHITE, test);
}
}
Dans OnPlayerCommandText :
if(strcmp(cmd, "/countdown", true) == 0)
{
countdown = 0; // reset
COUNTDOWN_TIMER = SetTimer("COUNTDOWN", 500, true);
return 1;
}