[FREE] Enhanced Trafficlights

Enhanced Trafficlights | :clapper: Preview

This scripts is basically an updated version of the Smart Trafficlights script, but it solves the problem of sync issues and AI not driving when the lights turn green.

In depth details The Enhanced Trafficlights Script was created to address synchronization issues between AI and players in a game regarding traffic light overriding behavior. Initially, the traffic lights only affected the player's view, without influencing AI behavior. After thorough research, it was discovered that there was no native game function to alter AI responses to changing traffic light states. To solve this, we implemented vector math to identify intersections and categorize nearby traffic lights based on their orientation. This allowed for the determination of which lights should be green or red, leading to improved AI behavior where vehicles stop at red lights and proceed on green. The script currently works 90% of the time and is continually being refined. The script is free, open-source, and open for contributions from the community.

:package: Features:

  • Every light around an intersection will be affected by changes
  • AI will stop / drive at red / green lights
  • Set the waiting time until a light turns green
  • updates in real time for every player on the server
  • optimized to be 0.00ms idle & ~0.06 use (only for like 0.5sec)

:books: API (WIP)

  • An API is currently in the making to ensure support for 3rd party scripts
  • An existing export is available but usage is not recomended at this time (update v1.0.0)

:white_check_mark: Download

Click here to download the latest release (Please download the .rar file to avoid any issues)

Code is accessible Yes
Subscription-based No
Lines (approximately) ~1000
Requirements None
Support Yes
23 Likes

Nice i gonne test it

2 Likes

Nice work!

1 Like

Thanks!!

Amazing🔥, will give it a try.

1 Like

I ran this on our server and it stopped out personal garages and other vehicle systems from working, it reduced AI traffic and locked down car spawning to three car models.

There also appeared to be a lot of code in the files that shouldn’t have been there. We removed this and our server returned to normal and everything start working again.

Well that doesn’t make any sense :face_with_raised_eyebrow:

Did you try reinstalling a fresh copy of the script release?

Sorry man, but there is no way I’m putting that back on our server.