COuntDown Textdraw - 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 Textdraw (
/showthread.php?tid=163380)
COuntDown Textdraw -
DragonBlaster50 - 27.07.2010
Hi, could someone help me on how to make a Countdown Textdraw? not a race one, but one of 60 seconds.
In the
Up in the middle of the screen, so NOT in the middle
Thanks.
Re: COuntDown Textdraw -
[MWR]Blood - 27.07.2010
https://sampforum.blast.hk/showthread.php?tid=118885
Re: COuntDown Textdraw -
ViruZZzZ_ChiLLL - 27.07.2010
Anyways, here :
pawn Code:
new Text:CountDownTD;
new seconds;
public OnGameModeInit()
{
CountDownTD = TextDrawCreate(230.000000,120.000000,"60 Seconds remaining");
TextDrawAlignment(CountDownTD,0);
TextDrawBackgroundColor(CountDownTD,0x000000ff);
TextDrawFont(CountDownTD,3);
TextDrawLetterSize(CountDownTD,0.499999,1.900000);
TextDrawColor(CountDownTD,0x0000ffff);
TextDrawSetOutline(CountDownTD,1);
TextDrawSetProportional(CountDownTD,1);
TextDrawSetShadow(CountDownTD,1);
SetTimerEx("CountDown", 1000, true, "i", playerid);
return 1;
}
forward CountDown(playerid);
public CountDown(playerid)
{
seconds--;
new string[178];
format(string,sizeof(string),"%d Seconds remaining",seconds);
TextDrawSetString(CountDownTD,string);
if(seconds == 0)
{
TextDrawHideForPlayer(playerid, CountDownTD);
// do something else here
}
return 1;
}
If it has some bugs, just PM me about this.
Re: COuntDown Textdraw -
DragonBlaster50 - 27.07.2010
Thanks, ALso one problem,
I wanna make Checkpoints, but can i do it in the format of
Quote:
Checkpoint1 = SetPlayerCheckpoint(etc,etc,etc,etc,etc);
|
Re: COuntDown Textdraw -
[MWR]Blood - 27.07.2010
Quote:
Originally Posted by DragonBlaster50
Thanks, ALso one problem,
I wanna make Checkpoints, but can i do it in the format of
|
Yeah, you can.
pawn Code:
//At the top of your GM / FS:
new Checkpoint1;
//Under OnGameModeInit:
Checkpoint1 = SetPlayerCheckpoint(...);
Re: COuntDown Textdraw -
DragonBlaster50 - 27.07.2010
Ah, thank you.
Re: COuntDown Textdraw -
DragonBlaster50 - 27.07.2010
Got Stuck Again, is their a way to define them all in 1 time?
Like
new Vehicles [4]
{
Cars here etc etc
}
but then for Checkpoints? (if so, Please give me a small example, i forgot it :P)
Re: COuntDown Textdraw -
DragonBlaster50 - 27.07.2010
Nevermind, got it myself
Re: COuntDown Textdraw -
Vince - 27.07.2010
Quote:
Originally Posted by ikarus
Yeah, you can.
pawn Code:
//At the top of your GM / FS: new Checkpoint1; //Under OnGameModeInit: Checkpoint1 = SetPlayerCheckpoint(...);
|
Has no effect, as SetPlayerCheckpoint does not return an id.
Re: COuntDown Textdraw -
ViruZZzZ_ChiLLL - 27.07.2010
Also, you better use a Streamer for checkpoints, because you can only
use one if it's not streamed.