Player position in race
#1

Hello.

I've made a basic sprint GM, there's no problem with it but I'd like to add a really simple thing that shows the player his position in the race.
I've found some systems around here but not as I want. One only gets the position if there is one player between two checkpoints, and an other one is for the entire race.
I would just like some clear explanations on how to do it. Without using any race FS or that kind of thing.
Showing the pos is not my problem, I need to get this pos..

Thanks you in advance for taking the time to read this.
Reply
#2

Ehm, the script depends to the racing map that you use:
you can make a variable for every player and increase the amount of it by the percent of the way they went and compare them at the OnPlayerUpadate.the thing you want is quite hard as most of the maps are not straight.
it's not impossible but for every map you make, you need to add thousands of lines to the GM.
this is the way I think it might work correctly, but there might be other ways too^^
Reply
#3

Well thanks for your answer
Reply
#4

Use race checkpoints. Simply and efficient.
Reply
#5

I doesn't give the position
Reply
#6

Example of its use:
https://sampwiki.blast.hk/wiki/OnPlayerEnterRaceCheckpoint

pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    // Additional code...
    return 1;
}
Reply
#7

I'm not sure to understand, anyway I'm taking a look at it, thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)