Still running into trucks, argh. At least the Froggers are having fun.
Added the old LS Underground map as 29-Empire to my list of exported maps for this Racing Script set.
Did some code cleanup, bug fixing. Working on documentation. Added random race options:
ârecurâ = {yes, no}
âorderâ = {yes, no}
When ârecurâ is yes, the same vehicle in the vehicle list can appear in later laps. When ârecurâ is no, a vehicle that was used in a previous lap will be removed from the vehicle list. Note that multiple vehicles of the same model can appear more than once in a vehicle list, so it is possible for the same vehicle model to reappear. If you donât want the same vehicle model to reappear in later laps, put only one of that model in the vehicle list.
When âorderâ is no, everyoneâs vehicles may be different on the same lap. For example, one player may have an âadderâ after their first lap while another player may have a âbanshee2â after their first lap. When âorderâ is yes, everyone will have the same vehicle on the same lap. For example, everyone will have an âadderâ after the first lap, âelegy2â after the second lap, âzentornoâ after the third lap, etc.
Working on documentation before release.
I have problem with saving races, typing command /races save pub iâm ending with this nottification. What can i do?
Can you post pictures of your F8 console on the client and also the console of the server when you receive these errors?
on F8 0 error (1 screenshot). Console with this error but my server is on esx and i didnt change port to esx (2 screenshot). If i change it in console says this (3,4 screenshot). On local host all basic non esx or QB, working god no errors and everyfing working.
It looks like you need to create a new port to ESX that complies with todayâs standards, as the ESX getSharedObjects feature is no longer supported. I donât understand these other errors, so I wonât comment
Try the following first, and if it doesnât work, I will ask you to try another thing in a different post.
First, add the following to your fxmanifest.lua
file:
shared_script '@es_extended/imports.lua'
In the ESX port of the port.lua
file that you are using instead of the original port.lua
file, do the following:
Delete the line:
local ESX = nil
Delete the following lines:
Citizen.CreateThread(function()
while nil == ESX do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Restart your server and try saving the track again. Let me know if it works and if it doesnât, tell me exactly what steps you took when following the above instructions and post any errors on the F8 client console and the server console.
I did exactly what you wrote above. I replaced the ports and followed your instructions. I reset the server, it did not show any errors when saving the route under F8 and the server console, saving routes works (Screenshot 1), but a new error appeared, which was also there before. Iâm trying to join a race and an error pops up in the server console but not in F8 and I canât join the race (screenshot 2). The error also pops up when I enter the server (screenshot 3)
Add the following to the top of the esx version of the port.lua
file that I asked you to modify:
ESX = exports["es_extended"]:getSharedObject()
Let me know if it works this time and if not, please post any errors in the F8 client console and the server console.
Now everything works. We are now testing all the functions of the script and I will let you know if anything else doesnât work. If you want, I can send you all the lines from port.lua to update on github.
Cool. You donât have to send me your port.lua
file. I know what to change. Thanks for testing things. I appreciate it. Iâve been working on some changes to the code and will release the new code soon, hopefully.
When I turn on the server, an error pops up (screenshot 1) I have to restart the script then it works normally and no errors appear
Make sure the following code is above all the functions in port.lua
. I think thatâs why youâre seeing that error.
ESX = exports["es_extended"]:getSharedObject()
EDIT: It shouldnât matter where this line is as long as it is outside of any functions so what I said above shouldnât matter.
EDIT: I think it does matter where itâs located, so the above edit is probably wrong.
Does the chat command /races funds
give the same error? Iâm not sure why youâre getting that error. Actually, it shouldnât matter where the ESX initilization is as long as it is outside of all the other functions.
EDIT: I think it does matter where it is placed, so the ESX initialization probably needs to be above all the other code.
An error appears if I do not restart the script. After restart it works normally
So if you restart the server, the error appears, but after you restart the script, the error disappears?
Exactly, I think itâs because when the server starts there is no one on the server and it canât read the data until the script is restarted. Error appears when i join to serwer (Screenshot 1)
I havenât been able to reproduce this error. Can you post your fxmanifest.lua
file and your port.lua
file?