I dont know he posted it here so i helped him here I dont know why you have to be so mean about it. You should be happy that someone else is helping provide support for your script…
Hey ! Sorry for my english, i’m french, i have a little problem,
I have only one place in the garage. I can buy several vehicles and store them, but only the first one is registered in the database, and there is only him that I can leave. All other vehicles purchased enter the garage but do not exit. The garage is locked in a single place. How can I increase this number of places?
@Plysken_Rayder is it possible for you to point me in the right direction so if a person deletes there car or crashes it without any way of getting it fixed (eg no tow trucks) it is able to be set as In (Rentré) without doing it manually in the sql?
Just make it so when you take the car out it never goes “Out” in the SQL or make a Timeout function that sets them as “In” every 6000000ms or 10 minutes, you would need to do this on the client:
Citizen.CreateThread(function ()
while true do
Citizen.Wait(600000)
TriggerServerEvent('TimedRestart')
end
end)
I think doing it like this you might have a problem with everyone updating all cars every 10 minutes, to fix this you need to pass the player identifier to the function and make it so it only updates the cars of that player every 10 minutes, this way every player will have only their cars back on the garage every 10 minutes they are logged on. I’m out and just checking the forum on my break, I’m sorry I don’t have time to post it working with the identifier. Good Luck.
This works in this way : if you server crash until your players have not setin they vehicle, this function set all vehicle setin, nothing else, and runs only once at server launch.
There are different levels of roleplay for different servers, some people think its a bit too much to have to wait till the server restarts to get their cars back, so having them in the garages every 10,30 minutes or even an hour would make them enjoy the game more than they would if they lost their cars for the day.