Race checkpoint lagg?
#1

So i created a nice simple race system and it works ok, but there's one annoying problem.

When the race starts people don't start moving (for each other) and it's like that until they hit the first checkpoint.

Then all hell breaks loose, 90% of the racers bump into each other and the race is practically ruined.

What could it be? Please help.
Reply
#2

Bump'z
Reply
#3

It's probably your code that causes it. We can't tell what's wrong if you don't show it.
Reply
#4

Quote:
Originally Posted by MadeMan
Посмотреть сообщение
It's probably your code that causes it. We can't tell what's wrong if you don't show it.
This is my whole OnPlayerEnterRaceCheckpoint callback:

pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(InDakar[playerid] > 0)
    {
        InDakar[playerid] += 1;
        if(InDakar[playerid] < 48)
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
            SetPlayerRaceCheckpoint(playerid, 0, DakarCheckpoints[InDakar[playerid]-1][0], DakarCheckpoints[InDakar[playerid]-1][1], DakarCheckpoints[InDakar[playerid]-1][2], DakarCheckpoints[InDakar[playerid]][0], DakarCheckpoints[InDakar[playerid]][1], DakarCheckpoints[InDakar[playerid]][2], DakarCheckpoints[InDakar[playerid]-1][3]);
        }
        else if(InDakar[playerid] == 48)
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
            SetPlayerRaceCheckpoint(playerid, 1, DakarCheckpoints[InDakar[playerid]-1][0], DakarCheckpoints[InDakar[playerid]-1][1], DakarCheckpoints[InDakar[playerid]-1][2], DakarCheckpoints[InDakar[playerid]-1][0], DakarCheckpoints[InDakar[playerid]-1][1], DakarCheckpoints[InDakar[playerid]-1][2], DakarCheckpoints[InDakar[playerid]-1][3]);
        }
        else if(InDakar[playerid] == 49)
        {
            if(DakarWinners < 3)
            {
                DakarWinners += 1;
                new string[128], PlayerName[24];
                GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
                format(string, sizeof(string), "DAKAR RACE: %s passed the finish line %d. - congratulations.", PlayerName, DakarWinners);
                SendClientMessageToAll(COLOR_ORANGE, string);
                InDakar[playerid] = 0;
                SetPlayerColor(playerid,0xFFFFFF00);
                DisablePlayerRaceCheckpoint(playerid);
                PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
            }
            else
            {
                InDakar[playerid] = 0;
                SetPlayerColor(playerid,0xFFFFFF00);
                DisablePlayerRaceCheckpoint(playerid);
                PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
                SetVehicleToRespawn(GetPlayerVehicleID(playerid));
            }
        }
    }
    return 1;
}
And i think it's important to mention that the problem occurs only on the first checkpoint...
Reply
#5

Bump.
Reply
#6

Something like this happened to me on another server, I don't remember why did this happen, probably sync bug (?). They fixed this, cuz there was a bug in something.

I bet there's a problem when the race is starting - because at this place players don't move...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)