je t'ai refait un count down ^^
le voici :
//Avant Main
new Compte;
new countdown;
forward CountDown();
//La commande
if (strcmp(cmdtext, "/count", true) == 0)
{
Compte=SetTimer("CountDown",1000,1);
countdown = 5;
SendClientMessageToAll(COLOR_RED,"Le compte à rebour commence !");
return 1;
}
//En bas du script
public CountDown()
{
new string[128];
if(countdown == 0)
{
KillTimer(Compte);
GameTextForAll("~g~GO GO GO !",1000,3);
PlayAllSound(1057);
}else{
format(string,sizeof(string),"~r~%d",countdown);
GameTextForAll(string,1000,3);
PlayAllSound(1056);
countdown--;
}
return 1;
}
PlayAllSound(soundid) //je pense que le problème venait de là, il faut mettre un son à tous les joueurs
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerPlaySound(i,soundid,0.0,0.0,0.0);
}
}
++
R@f