- I have a custom script (object loader) to load and unload any track xml map from spooner or map editor file, once loaded i can add checkpoints from you script, thus this way it will be a custom map an not just checkpoints.
Thats what I mean by off loading or keeping them there.
-
The more flexable this is for as many results table the better
-
I understand the amount of work, sometimes you have to bite the bullet. Yes there are so many chat commands, why to many in my opinion, and I have to keep a cookbook of commands.
I understand you want to keep it as personal as possible, but if you want to move forward to a even more fantastic script, thatâs of course down to how you want it to develop.
Again great work so far
Streamed a bit racing Froggers in an air map.
Did not have an AI list, so spent some time setting that up too.
1 Like
Thanks for using the scripts and recording a video.
FYI, I believe you are using an older version of the scripts. When you deleted uno before spawning the vehicle for it, there is a bug where you saw âIgnoring leave eventâ. I fixed that in the latest version of the scripts.
The command to delete all AI is â/races ai deleteAllâ, but you do not have to do this to change the vehicles the AI are in. You can just type â/races ai spawn alpha froggerâ to change the vehicle instead of deleting, adding and then spawning.
Iâm considering combining the AI add and spawn commands so you only need to add the AI and specify the vehicle model, then move out of the way and when you are far enough from the location you added it, the vehicle spawns. The spawn command will be used to change the vehicle the AI is driving.
I found a bug in the latest uploaded code where you cannot create a race with the vehicle class being -1, which uses a custom list of vehicles racers can pick from. Iâll fix it in the next upload.
1 Like
Latest version of scripts uploaded to GitHub
CHANGE NOTES
- 2024-03-29
- races_client.lua
- removed â/races ai add [name]â command
- removed âaddAIDriverâ function
- added âcoordâ and âheadingâ arguments to âspawnAIDriverâ function
- player adds and spawns AI driver using â/races ai spawn [name] (vehicle)â command
- player must move away from where AI driver was added for ped and vehicle to spawn
- if player attempts to spawn AI driver, but fails because some restriction is not satisfied(vehicle or vehicle class), AI will be added without a ped and vehicle spawning
- â/races ai listâ command will show AI driver without a vehicle
- if player types â/races ai loadGrp [access] [name]â, AI driver ped and vehicle will not spawn if player is too close to where AI driver would spawn
- â/races ai listâ command will show AI driver without a vehicle
- player must move away for AI driver ped and vehicle to spawn
- player can change AIâs vehicle using â/races ai spawn [name] (vehicle)â command
- fixed bug where player is unable spawn AI or load AI group in âCustomâ(-1) class races
- aiState.drivers[name].raceVehicleList was nil when âspawnAIDriverâ function was called
- fixed bug where AI drivers calculated current waypoint incorrectly if playerâs âstartIsFinishâ value is different than âaiState.startIsFinishâ
- was using âstartIsFinishâ instead of âaiState.startIsFinishâ
- fix was to use âaiState.startIsFinishâ instead of âstartIsFinishâ to calculate current waypoint
- fixed bug where finish event was not triggered by server if player joined race, then left before start delay expired
- âbestLapVehicleNameâ was nil before start delay expired
- server ignored finish event because âvehicleNameâ argument was nil
- results event would not be triggered by server
- race would not be deleted on server and player would not be able to register another race
- player would have to unregister race as work around for problem
- fix was to set âbestLapVehicleNameâ before start delay expired
- fixed bugs where finish and results events were not caught by client if player joined race, then left before start delay expired
- leaving would set âraceIndex = -1â prematurely and finish and results events were not caught because ârIndexâ did not equal âraceIndexâ
- fix was to set âraceIndex = -1â only when results event was caught
- changed combined start/finish waypoint color to orange
- changed current waypoint blip color to yellow so racer knows which blip is current waypoint
- print model and long name of vehicles in âlistVehâ function
- races_server.lua
- modified âsaveResultsâ function so results are saved as JSON file instead of text file
- index.html
- removed âai_addâ button
- index.css
- removed âai_addâ style
- index.js
- removed âai_addâ click function
2 Likes
Latest version, unable to start, frozen here:
I typed /races start 12 and it went to this screen. No countdown.
FiveM client 7788 windows server artifact 7819
Nevermind, went back to an older windows artifact server and it works fine, just not in 7819, also no peds or other vehicles in 7819.
Do you see any errors in the F8 client console or the server console in artifact 7819? I use the latest recommended artifact (7290) to test the scripts.
No, nothing in the F8 console and no errors in the server logs. I only went to 7819 because TXAdmin DIscord said to upgrade to it for its scripts, I may go higher tomorrow. 7617 works fine.
Latest video with the latest scripts and server windows artifact 7617 working just fine.
1 Like
Nice Idea, however, you couldnt really have a proper agrassive race. The Aiâs are just like sheep on a track.
I think that would be good to showcase something, but in my view its not racing.
Better off doing it wirh Sim racing, like I use AMS2 with AIâs are fantastic. Also tracks are all built with fantastic tracks, circuits.
Can i ask how are you planning on using the AIâs for? as clearly there is no competition , i mean easy to beat always.
hope you donât take it personally, as itâs just an observation.
I can see no fun factor at allâŚ
Everyoneâs idea of fun is different. Someone could find racing with slow AI is fun and others would say itâs boring. Basketball, football, soccer, car racing, sky diving, reading books, dancing is fun or boring to someone. Not everyoneâs idea of fun is the same. Someone could like the scripts I made or they could hate them. You get the idea.
Sometimes I race helicopters with these scripts. If there are no obstacles, they are very competitive. I have have fun with them.