Open wanderrer opened 3 years ago
Closing this due to I don't control neither spawn the trains thus I can't fix this
It has nothing to do with the spawning of the trains and trams, it has to do with how you collect the information regarding players and distances. On onesync infinity, you have to do that on the server side, not on the client side, and trigger it back with a callback
---- On Mon, 06 Dec 2021 22:25:06 +0200 Indra @.***> wrote ----
Closing this due to I don't control neither spawn the trains thus I can't fix this
— You are receiving this because you authored the thread. Reply to this email directly, https://github.com/TheIndra55/fivem-trams/issues/7#issuecomment-987175754, or https://github.com/notifications/unsubscribe-auth/APFSJMLK7WVLGPH3GOLLXWLUPUL2FANCNFSM5C5GGBUQ. Triage notifications on the go with GitHub Mobile for https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I only collect information about trains closer than 100 units, this is only needed to control stuff such as doors and should be in the current infinity scope.
Hello again, It doesn't matter the radius, everything related to getting players and distances between players and objects must be done on the server side and returned to client side via a callback, otherwise the scrip won't work as it should. In my case, for the rest of my scripts, I fixed that by using polyzones (for instance, when a player was getting close to a door, we had to measure the distance in order to display information or popup an action, and the script was doing that every second for each player, right now, the script will be triggered only if the player is inside a polyzone).
The scoreboard was messed up, it will only gather information about the players in my 500 units radius, same thing for proximity chat. Once we change the gathering of information on servers side, and get that back to client side, everything started to work correctly.
Unfortunately I'm not a programmer, I'm struggling to make sense of everything going on and by doing that I learn a bit more each day. At this point in time, the only thing that is not working correctly is this wonderful resource and I don't have a way to make it work, this is why I push so much. It was a part of our community for a long time and I'm not going to let it go :) Sorry for the long post
Please try the latest commit, I removed basically the door code and replaced it by a new native I was not aware of. Tested on infinity and could initially reproduce the train not moving, seems to work now with that code removed.
Hello, Not working for me, same thing still happens :/
Hello again, From the last update, no luck to make the trams & trains work on OneSync Infinity. It will spawn both vehicles but are stuck, not moving not doing anything. Further more the, street lights seem to be stuck on red, near the trains or trams. As you know, on Infinity we have to gather players info/coordinates on server side and push them back to client side via a trigger. I have tried to make it so, but unfortunately I was not able to make it work. Once the Train or Tram gets de-spawned, everything goes back to normal. https://www.youtube.com/watch?v=nlYPbFOjZ_4 catured on stream...