[Race]How to get Player Position in Race (example: 3rd/10) - 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: [Race]How to get Player Position in Race (example: 3rd/10) (
/showthread.php?tid=86995)
[Race]How to get Player Position in Race (example: 3rd/10) -
Basss - 17.07.2009
I need help i dunno how to make the Playerposition in Race.. i know calculationg it but not how..
Pls help
Re: [Race]How to get Player Position in Race (example: 3rd/10) -
Basss - 17.07.2009
noone?
Re: [Race]How to get Player Position in Race (example: 3rd/10) -
Vince - 17.07.2009
- You need a variabele for the checkpoints to begin with (new PlayerRCP[MAX_PLAYERS]),
- and a variabele to check if the player is in the race (new InRace[MAX_PLAYERS])
- With each checkpoint the player reaches, increment the PlayerRCP with 1.
- Set up a looping timer on race start to a function called (for example) UpdateRacePos().
- Create your new public.
- Make it loop trough all players in the race.
- Sort out the positions by PlayerRCP.
- If two or more players are at the same CP, check who is closest to the next CP (PlayerToPoint)
Something like that. Not simple though ...
Re: [Race]How to get Player Position in Race (example: 3rd/10) -
Basss - 17.07.2009
i know this but explain a bit more i dunno what i should do correctly
Re: [Race]How to get Player Position in Race (example: 3rd/10) -
Basss - 17.07.2009
help
Re: [Race]How to get Player Position in Race (example: 3rd/10) -
saiberfun - 17.07.2009
stop bumping :/