/countdown - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /countdown (
/showthread.php?tid=62481)
/countdown -
My_Waffles_Bitch_L0L - 21.01.2009
ehm, can i get an countdown cmd for ma admin script (plz help in my "cant compile my admin script forum")? i rly need it, a announce countdown
Re: /countdown -
Dark_BasS - 21.01.2009
You can download myn countdown
(but it's for everybody not just for admins)
if you really need in your admin spec than try ermm... look in g_admin there is an countdown cmd i think..
you can see there how to do it.
Re: /countdown -
Rks25 - 21.01.2009
a simple countdown or a countdown [seconds]?
Re: /countdown -
My_Waffles_Bitch_L0L - 21.01.2009
yes, an /coundown cmd there will show game text with countdown :P
Re: /countdown -
Shadowww - 21.01.2009
in header:
OnGameCommandText:
pawn Код:
if(strcmp(cmd,"/count",true)==0)
{
cd_sec = 5;
cd_timer = SetTimer("countdown", 999, 1);
return true;
}
In end of script:
pawn Код:
public countdown()
{
if(cd_sec == 0)
{
GameTextForAll("~r~Go!",1000,3);
KillTimer(cd_timer);
}
else
{
new string[8];
format(string,sizeof(string),"~g~%d",cd_sec);
GameTextForAll(string,1000,3);
}
cd_sec = cd_sec-1;
return 1;
}
Re: /countdown -
My_Waffles_Bitch_L0L - 29.01.2009
Quote:
Originally Posted by Shadowww
in header: OnGameCommandText:
pawn Код:
if(strcmp(cmd,"/count",true)==0) { cd_sec = 5; cd_timer = SetTimer("countdown", 999, 1); return true; }
In end of script:
pawn Код:
public countdown() { if(cd_sec == 0) { GameTextForAll("~r~Go!",1000,3); KillTimer(cd_timer); } else { new string[8]; format(string,sizeof(string),"~g~%d",cd_sec); GameTextForAll(string,1000,3); } cd_sec = cd_sec-1; return 1; }
|
omg ty it works :P but how do i cnahge the gamemode text per second? etc. 1 second= 1 and etc.
Re: /countdown -
Shadowww - 29.01.2009
format(string,sizeof(string),"~g~%d",cd_sec);
GameTextForAll(string,1000,3);
^^^ This is gametext which shows 5... 4... 3... 2... 1... go
You can change it to (e.g.):
format(string,sizeof(string),"
~g~%d~w~seconds left!",cd_sec);
GameTextForAll(string,1000,3);
Re: /countdown -
My_Waffles_Bitch_L0L - 29.01.2009
Quote:
Originally Posted by Shadowww
format(string,sizeof(string),"~g~%d",cd_sec);
GameTextForAll(string,1000,3);
^^^ This is gametext which shows 5... 4... 3... 2... 1... go
You can change it to (e.g.):
format(string,sizeof(string),"~g~%d~w~seconds left!",cd_sec);
GameTextForAll(string,1000,3);
|
ehm, not cuz im TOTALLY noob, but how do i define the string :P
Re: /countdown -
Shadowww - 29.01.2009
Khem, what?
Re: /countdown -
My_Waffles_Bitch_L0L - 29.01.2009
Quote:
Originally Posted by Shadowww
Khem, what?
|
can u giv meh the full script in a code :P