How to fix rRace System: "Race Position".
#1

Hi guys

I have edited a lot ryder's race system, but still i have that bug with incorect position, when i race. Sometimes, it shows me good, but sometimes, shows me like this:

or

This is the variable, what show my position in race:
Код:
RacePosition[ playerid ] = floatround( CPCoords[ CPProgess[ playerid ] ][ 3 ], floatround_floor );
I tried to fix this, by reseting CPProgess variable for all players, when a race stops, but don't work. Someone know how to fix this issue?

Thanks.
Reply
#2

I might as well bump this one, because I stumbled into the same problem. RacePosition variable just keeps increasing with every new race. Any ideas?

Or at least can someone explain me how does it get race position from just this one line under OnPlayerEnterRaceCheckpoint?

RacePosition[playerid] = floatround(CPCoords[CPProgess[playerid]][3], floatround_floor);

EDIT: Still not quite understanding how it works, but this fixed it under LoadRace(), but before reading the race files:
Код:
for(new i;i<MAX_RACE_CHECKPOINTS_EACH_RACE;i++)
	{
	    CPCoords[i][0]=0.0;
	    CPCoords[i][1]=0.0;
	    CPCoords[i][2]=0.0;
	    CPCoords[i][3]=0.0;
	}
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    CPProgess[i] = 0;
	    CPCoords[i][3] = 0;
	}
Reply
#3

I did that and now /startautorace says command doesn't exist.

EDT: Actually that loop fixed the problem but I had to put it in stoprace.
Reply
#4

Maybe this happens because you edit it? Try to create your own, it will be easier, and you will be able to fix any kind of bug.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)