13.08.2011, 21:19
My god.. type /count to start.
pawn Код:
#include "a_samp"
new Count;
new Timer;
public OnGameModeExit()
{
KillTimer(Timer);
return true;
}
forward CountDown();
public CountDown()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
Count += 1;
switch(Count)
{
case 3:GameTextForAll("~w~- ~r~ 3 ~w~- ~r~ 3 ~w~- ~r~ 3 ~w~ -", 4000, 3);
case 6:GameTextForAll("~n~~n~~w~- ~r~ 2 ~w~- ~r~ 2 ~w~- ~r~ 2 ~w~ -", 4000, 3);
case 9:GameTextForAll("~n~~n~~n~~n~~w~- ~r~ 1 ~w~- ~r~ 1 ~w~- ~r~ 1 ~w~ -", 4000, 3);
case 12:
{
GameTextForAll("~n~~n~~n~~n~~n~~n~~w~- ~r~ Start ~w~- ~r~ Start ~w~- ~r~ Start ~w~ -", 4000, 3);
TogglePlayerControllable(i, true);
KillTimer(Timer);
}
}
TogglePlayerControllable(i, false);
}
return true;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/count", cmdtext, true, 10) == 0)
{
Timer = SetTimer("CountDown", 1000, true);
return true;
}
return false;
}