race position counter -
LifeStyle - 29.08.2010
How to create this position counter?
[ame]http://www.youtube.com/watch?v=uroxkFBVqSs[/ame]
Re: race position counter -
Thebest96 - 29.08.2010
Dude use SEARCH, use some race filterscripts
Re: race position counter -
gamer931215 - 29.08.2010
Quote:
Originally Posted by Thebest96
Dude use SEARCH, use some race filterscripts
|
Its also very easy to make, lol.
As example:
On declarations:
pawn Код:
new CP_Counter[MAX_PLAYERS]; //make an counter per player.
OnPlayerEnterCheckpoint:
pawn Код:
CP_Counter[playerid]++; //will add +1 to the counter
new string[128];
format(string,sizeof string,"You've entered checkpoint %i.",CP_Counter[playerid]); //preparing text for GameText and filling in the counter.
GameTextForPlayer(playerid,string,5000,6); //show for 5 seconds the text
Re: race position counter -
LifeStyle - 29.08.2010
I know how to. I mean this textdraw.. :P
Re: race position counter -
Mauzen - 29.08.2010
I thinks he wants to have something like the "Pos 1 / 6" thing.
I never used Race filterscripts, but i would do this with a global timer for all players. Try to sort the players somehow. First of all using the checkpoint number he is at, then the distance to the next checkpoint, if there are several players at the same checkpoint.
Re: race position counter -
LifeStyle - 29.08.2010
Ehh.. I know how to make counters and all. I mean this textdraw box. Excatly the same. i can't seem to get it right with any textdraw editor
Re: race position counter -
gamer931215 - 29.08.2010
Quote:
Originally Posted by LifeStyle
I know how to. I mean this textdraw.. :P
|
http://wiki.sa-mp.com check out the textdraw, its pretty simple. Il explain for example(again :P)
Declarations:
pawn Код:
new text:TD_CPcount[MAX_PLAYERS];
When an race starts do this:
pawn Код:
TD_CPcount[playerid] = TextDrawCreate(xpos,ypos,"Checkpoint: 0/6"); //we use 6 cp's as example
TextDrawShowForPlayer(playerid,RD_CPcount[playerid]);
When an player enters the checkpoint do what i posted before, but instead of GameTextForPlayer use:
pawn Код:
//that counter +1 etc (check my other post)
//prepare string with format (dejavu... check other post)
TextDrawSetString(TD_CPcount[playerid],string); //this is the important part, this will update the textdraw
And when the player has finished the race just use:
pawn Код:
TextDrawDestroy(TD_CPcount[playerid]);
To get the right positions/making an box you can use an TextDrawEditor like this one:
http://forum.sa-mp.com/showthread.ph...TextDrawEditor
Re: race position counter -
LifeStyle - 29.08.2010
I mean this box exactly the same as my post before your ones >
"Ehh.. I know how to make counters and all. I mean this textdraw box. Excatly the same. i can't seem to get it right with any textdraw editor"
Re: race position counter -
gamer931215 - 29.08.2010
Quote:
Originally Posted by LifeStyle
I mean this box exactly the same as my post before your ones >
"Ehh.. I know how to make counters and all. I mean this textdraw box. Excatly the same. i can't seem to get it right with any textdraw editor"

|
Well an perfect clone isnt maybe always possible, but you can atleast try to make one that just looks like it.
Re: race position counter -
Paladin - 29.08.2010
By using check points you can calculate who is first in line and such.