[FS] Count Down System -
Fumis - 21.02.2009
·..·°Count Down System°·..·
• /count to start counting.
-------------------------------------------
V2 news: Antispam /count one time in 6sec.
-------------------------------------------
Download V2:

*****************
Mirrors:
V1:
•
http://www.sendspace.com/file/qvjk9r
V2:
•
http://www.sendspace.com/file/lzhv00
•
http://pastebin.com/f55c32ec9
Re: [FS] Count Down System -
[LNL]Remulis - 21.02.2009
Nice Men!
Great Job!!
I Will Use It for My Server!!!
Re: [FS] Count Down System -
DDaGxXx - 21.02.2009
Good, for new scripters.
Re: [FS] Count Down System -
Maercell - 21.02.2009
Sorry, but: It\'s very simpler than you\'ve made it.
And: string[458]; wtf? 40 are enough.
You should learn better PAWN and make a new version
Re: [FS] Count Down System -
Nimphious - 21.02.2009
Quote:
Originally Posted by Maercell
Sorry, but: It\'s very simpler than you\'ve made it.
And: string[458]; wtf? 40 are enough.
You should learn better PAWN and make a new version 
|
Yes,
pawn Code:
new pName[30];
new string[458];
GetPlayerName(playerid, pName, 30);
format(string, 280, "*** %s started count.", pName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
Correct me if im wrong but isn\'t the largest string 256?
Re: [FS] Count Down System -
Fumis - 21.02.2009
FIXED. ty for reporting.
Re: [FS] Count Down System -
[LNL]Remulis - 21.02.2009
KK Thanks
Re: [FS] Count Down System -
bpeterson - 21.02.2009
Hey!
Nice FS! I need a function.. Can you add an anti-spam function? Because player like spam the server with /count...
Thx!
Re: [FS] Count Down System -
Fumis - 21.02.2009
Tommorow will be V2. With anti-spam.
Re: [FS] Count Down System -
Synkro93 - 21.02.2009
I actually don\'t know if it is possible, but it could be like people near the one that starts the countdown will be freezed until the countdown ends?
Re: [FS] Count Down System -
Nimphious - 21.02.2009
I dunno maybe this?
pawn Code:
forward CommandTimer(playerid);
pawn Code:
new commandused[MAX_PLAYERS];
new timer[MAX_PLAYERS];
pawn Code:
if(strcmp(cmdtext,"/count",true) == 0) {
new pName[30];
new string[458];
timer[playerid] = SetTimerEx("command", time,playerid);
commandused[playerid] = 1;
GetPlayerName(playerid, pName, 30);
format(string, 280, "*** %s started count.", pName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
GameTextForAll("~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
for(new i; i < MAX_PLAYERS; i++) {
GetPlayerPos(i,X,Y,Z);
}
SetTimer("count2",1000,0);
SetTimer("count1",2000,0);
SetTimer("countgo",3000,0);
return 1;
}
return 0;
}
pawn Code:
public CommandTimer(playerid)
{
commandused[playerid] = 0;
}
just a quick draft, not good with timers.
Re: [FS] Count Down System -
Fumis - 21.02.2009
V2:
Quote:
#include <a_samp>
#define FILTERSCRIPT
#if defined FILTERSCRIPT
#define COLOR_LIGHTBLUE 0x33CCFFAA
forward count2();
forward count1();
forward countgo();
forward stop();
new bool:a;
new Float:X, Float:Y, Float:Z;
#else
#endif
////////////////////////////////////////////////////////////////////////////////
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/count",true) == 0) {
new pName[30];
new string[256];
if (a == false)
{
a = true;
GetPlayerName(playerid, pName, 30);
format(string, 280, "*** %s started count.", pName);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
for(new i; i < MAX_PLAYERS; i++) {
GameTextForPlayer(i, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ 3 ~g~-",1000,3);
GetPlayerPos(i,X,Y,Z);
}
SetTimer("count2",1000,0);
SetTimer("count1",2000,0);
SetTimer("countgo",3000,0);
SetTimer("stop",6000,0);
}
else SendClientMessage(playerid, 0xFF9900AA, "Its allready started!");
return 1;
}
return 0;
}
////////////////////////////////////////////////////////////////////////////////
public count2()
{
for(new i; i < MAX_PLAYERS; i++) {
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n ~~n~~g~-~y~ 2 ~g~-",1000,3);
GetPlayerPos(i,X,Y,Z);
}
}
////////////////////////////////////////////////////////////////////////////////
public count1()
{
for(new i; i < MAX_PLAYERS; i++) {
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n ~~n~~g~-~y~ 1 ~g~-",1000,3);
GetPlayerPos(i,X,Y,Z);
}
}
////////////////////////////////////////////////////////////////////////////////
public countgo()
{
for(new i; i < MAX_PLAYERS; i++) {
GetPlayerPos(i,X,Y,Z);
GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n ~~n~~g~-~y~]~g~-~g~START~g~-~y~]~g~-",1000,3);
PlayerPlaySound(i,1057,X,Y,Z);
}
}
public stop()
{
a = false;
}
//////////////////
// © Fumis 2009 //
//////////////////
|
Re: [FS] Count Down System -
Weirdosport - 21.02.2009
I added an antispam device and made the entire thing neater.
Link
Updates include:
- Only Uses 1 timer now!
- Made the strings considerably smaller, therefore less memory required!
- Only 1 timer may run at once, anyone that tries to start an additional timer while one is running will be told it is busy
Ignore the copyright I put at the bottom, that was just for the sake of it, you are free to modify it as you wish.
Thread starter please take note, it is much easier to work on scripts when you use indentations and leave gaps between callbacks etc.
As for freezing the people within a given radius, it\'s definetely possible, but that might take me a few more minutes!
For the record, I am Thomas_Conroy!
Re: [FS] Count Down System -
bpeterson - 22.02.2009
Thx! Now it\'s a gr8 FS! Thx a lot!
Re: [FS] Count Down System -
Antironix - 22.02.2009
Quote:
Originally Posted by [FF
Nimphious ]
...
Correct me if im wrong but isn\'t the largest string 256?
|
No, the largest string is a big number, in the millions or even billions. 256 has been used because someone started with it.
Re: [FS] Count Down System -
Weirdosport - 22.02.2009
Quote:
Originally Posted by TheATheBTheC..
Quote:
Originally Posted by [FF
Nimphious ]
...
Correct me if im wrong but isn\'t the largest string 256?
|
No, the largest string is a big number, in the millions or even billions. 256 has been used because someone started with it.
|
At the end of the day it doesn\'t matter what the biggest string is, the string in question only needs to be around 60 characters max, so a string of length 100 would cover it with a lot of room to spare. The larger the string you use, the more memory you waste!
Re: [FS] Count Down System -
hujmens007 - 22.02.2009
tnx..really good fs
Re: [FS] Count Down System -
bpeterson - 22.02.2009
Yes it is.
Re: [FS] Count Down System -
Fumis - 22.02.2009
V2 links added.
Re: [FS] Count Down System -
tehcudguy - 22.02.2009
This could\'ve been made much more easier, there\'s about 4 timers for one function, anyway good job.