race position counter
#1

How to create this position counter?

[ame]http://www.youtube.com/watch?v=uroxkFBVqSs[/ame]
Reply
#2

Dude use SEARCH, use some race filterscripts
Reply
#3

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
Reply
#4

I know how to. I mean this textdraw.. :P
Reply
#5

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.
Reply
#6

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
Reply
#7

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
Reply
#8

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"

Reply
#9

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.
Reply
#10

By using check points you can calculate who is first in line and such.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)