#Ghosting does not work properly

1 messages · Page 1 of 1 (latest)

gilded coral
#

We have been testing and testing the script on my live server for about 2 weeks. Everything works pretty well except the ghosting (I have also seen other users report problems with the ghosting system before).

The main problem is that it stops acting/working randomly, either at the start or in the middle of the race (Yes, we do races with the Ghosting option on “Always”), then you end up crashing with other racers.

Attached is my current “config.lua”, the ghosting section:

Config.Ghosting = {
    Enabled = true,       --adding ability to toggle per started race soon
    Timer = 0,            -- Default timer, in milliseconds. SET TO 0 TO HAVE ON FOR ENTIRE RACE. This is what's used if you leave the field blank when setting up a race
    DistanceLoopTime = 0, -- in ms. Time until the ghosting script rechecks positions. Higher will be less accurate but will be more performance friendly.
    DeGhostDistance = 150,
    Alpha = 254,          -- see https://docs.fivem.net/natives/?_0x658500AE6D723A7E for info
    Options = {
        { value = -1,         text = 'No' },
        { value = 0,          text = 'Siempre' },
        { value = 10 * 1000,  text = "10 s" },
        { value = 30 * 1000,  text = "30 s" },
        { value = 60 * 1000,  text = "60 s" },
        { value = 120 * 1000, text = "120 s" },
    }
}

Attached are also all the videos I have, some are from users so they do not have the F8 or debug information. We are trying that when the failure happens to them they put the debug console or similar.

jaunty ravine
#

Did you test with a lower DeGhostDistance?

#

It's set 150 meters to another player now

gilded coral
#

what should be a good value?

#

default is 100 i think?

jaunty ravine
#

I'm sure 10-20 works fine

#

The lower it is the more it will fail to de-ghost when another player gets close tho, for example if a cop is coming head on towards the racers then 20 meters is very low to check for

#

But since your DistanceLoopTime is 0 it might still be fine

#

As long as there aren't to many players around which slows down the thread

gilded coral
#

Yep, tested with with 8 players and cops behind

#

finally i lowered de deghost distance to 8.0 meters

#

we will see if with too many racers this will be a problem or not, but again, thank you for your help

jaunty ravine
#

👍