15.12.2012, 09:50
Hello,
I have a countdown system which count down to 5 seconds.
can someone change it from 5 seconds to 5 minutes..
like it would show
5:00
4:59
till 00:01
please, and also make it more efficient if possible.
thank you.
I have a countdown system which count down to 5 seconds.
pawn Код:
#include <a_samp>
#define COLOR_LIGHTBLUE 0x33CCFFAA
forward one();
forward two();
forward three();
forward four();
forward five();
forward start();
new pName[30];
new string[256];
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Count Down By *Aldi*");
print("--------------------------------------\n");
return 1;
}
#else
#endif
public five()
{
GameTextForAll("~g~5",2000,3);
return 1;
}
public four()
{
GameTextForAll("~y~4",2000,3);
return 1;
}
public three()
{
GameTextForAll("~p~3",2000,3);
return 1;
}
public two()
{
GameTextForAll("~b~2",2000,3);
return 1;
}
public one()
{
GameTextForAll("~w~1",2000,3);
return 1;
}
public start()
{
GameTextForAll("~r~Go Go Go!!!",3000,3);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/count", cmdtext, true, 10) == 0){
SetTimer("five", 1000, 0);
SetTimer("four", 2000, 0);
SetTimer("three", 3000, 0);
SetTimer("two", 4000, 0);
SetTimer("one", 5000, 0);
SetTimer("start", 7000, 0);
{
GetPlayerName(playerid, pName, 30);
format(string, 280, ">> %s started Count-Down.<<", pName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
}
return 1;
}
return 0;
}
like it would show
5:00
4:59
till 00:01
please, and also make it more efficient if possible.
thank you.