Dyztiny-Project / DyzCarSystem

The vehicle HUD for FiveM NUI.
GNU General Public License v3.0
20 stars 15 forks source link

Cruise Control #1

Open ArduousDev opened 3 years ago

ArduousDev commented 3 years ago

Cruise Control is not working for me or others.

l3lackMegas commented 3 years ago

Hi, @ArduousDev! Thank for open this issues.

The Cruise control function will be setEntityMaxSpeed at the current speed of vehicle. (This line) I think your project may have some resources is trying to setEntityMaxSpeed.

Anyway, please give me more information to figure out what causes the problem.

ArduousDev commented 3 years ago

The HUD works fine. There is no other scripts I have a empty test server.

FlukRocker commented 3 years ago

@ArduousDev Hi i just test on my own local server. it seem fine for me please provide more detail about your server setup.

Video: https://streamable.com/eksskb

l3lackMegas commented 3 years ago

The HUD works fine. There is no other scripts I have a empty test server.

I have no idea what is the causes.

Can you give me some screen record to see the problem?

Recording and follow this steps below to help me check it out.

  1. Drive the vehicle at a speed 40 M/H.
  2. Reduce the speed to 20 M/H and press the CAPSLOCK key to toggle cruise.
  3. Continue driving for a few seconds and press CAPSLOCK key again to disable cruise.
ArduousDev commented 3 years ago

https://streamable.com/nnomvd

l3lackMegas commented 3 years ago

https://streamable.com/nnomvd

Thank you!

I tried to analyze the problem from your video. But I still can't figure out the cause of this. Sorry. :(

I want more information.

ArduousDev commented 3 years ago

Fresh server install, nothing but this script was running. Tried with and without OneSync still the same result. At this point i'll just have to make my own cruise control.

l3lackMegas commented 3 years ago

I tried to figure out the cause with my fresh server install too, but It's fine for me. So I think the problem might be from vehData['cruiseSpd'] is 0 in this line. https://github.com/Dyztiny-Project/DyzCarSystem/blob/da07be962e7c19fcfd0408f7917ab370091e0694/client/main.lua#L107 But it should not a problem by get the current speed from GetEntitySpeed(currVeh). https://github.com/Dyztiny-Project/DyzCarSystem/blob/da07be962e7c19fcfd0408f7917ab370091e0694/client/main.lua#L82

I really have no idea about it. But if you can make your own cruise control. could you please contribute to this project too? ;-;

ArduousDev commented 3 years ago

It's now setting the speed, however once I let go of the accelerator the speed drops.

xerenon commented 3 years ago

i have new pull request i think it might help https://github.com/Dyztiny-Project/DyzCarSystem/pull/4

ArduousDev commented 3 years ago

Cruise Control is now working. Excellent!

l3lackMegas commented 3 years ago

There are some bug report from forum about this feature of #4.

Thank you, Ken_Janelle_Jr

Okay so this is really buggy with the cruise control. While enabled, it doesn’t disabled if you slow down or wreck, it’ll keep going. If the car is badly damaged and cruise control is on the car will go crazy. There needs to be checks for this, I don’t know why these functions aren’t already in as that is how cruise control actually works in real life & for every other resource out there with cruise control.

Engine health isn’t working either but that is the least of my worries.

I'll open the issue again and try to fix it later when i'm free.