Adding sounds to countdown?
#7

Try sumin like this.

pawn Код:
#define FILTERSCRIPT

#include <a_samp>

new Counter;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
  Counter = 0;
  return 1;
}

public OnFilterScriptExit()
{
  Counter = 0;
  return 1;
}
#else

main()
{
    print("\n------------------------------------------");
    print(" Countdown");
    print("------------------------------------------\n");
}

#endif

public OnPlayerCommandText(playerid, cmdtext[])
{
  if(!strcmp(cmdtext, "/countdown", true))
  {
    if(Counter != 0) return SendClientMessage(playerid,0x004BFFFF, "ERROR: /countdown is already in use, Try again in a few seconds.");
    Counter = 3;
    Timer();
    return 1;
  }
  return 0;
}

forward Timer();
public Timer()
{
  new String[64];
  if(Counter == 0)
  {
    for(new i = 0; i < GetMaxPlayers(); i++)PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
    GameTextForAll("~g~~h~Go Go Go !!", 1250, 5);
    return 1;
  }
  format(String,sizeof(String),"~r~~h~%d",Counter);
  GameTextForAll(String, 1250, 5);
  for(new i = 0; i < GetMaxPlayers(); i++)PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
  Counter--;
  SetTimer("Timer", 1000, false);
  return 0;
}
Reply


Messages In This Thread
Adding sounds to countdown? - by Jay. - 02.06.2010, 17:15
Re: Adding sounds to countdown? - by Jay. - 02.06.2010, 17:23
Re: Adding sounds to countdown? - by Sir_Brock - 02.06.2010, 17:24
Re: Adding sounds to countdown? - by Jay. - 02.06.2010, 17:25
Re: Adding sounds to countdown? - by Sir_Brock - 02.06.2010, 17:28
Re: Adding sounds to countdown? - by Jay. - 02.06.2010, 17:33
Re: Adding sounds to countdown? - by Killa_ - 02.06.2010, 17:50
Re: Adding sounds to countdown? - by Jay. - 02.06.2010, 17:54
Re: Adding sounds to countdown? - by Sir_Brock - 02.06.2010, 18:09
Re: Adding sounds to countdown? - by Killa_ - 03.06.2010, 19:34

Forum Jump:


Users browsing this thread: 1 Guest(s)