[CitizenMP] [Release] [EN] [Async] Garages V6 - 23/09/18

Edit of 23/09/2018


Bonjour,
Beaucoup d’entre vous m’on demandé de rendre de nouveau le mod disponible. Donc le voici.

Mais je ne ferai pour le moment aucun support.


Hello,
Many of you have asked me to make the mod available again. So here it is.

But I will not do any support for the moment.


Name: Garages2

Version: 6 - 16/07/17
Download: https://github.com/plysken/garages

8 Likes

All is Working good but when i sell a vehicle I don’t receive the money :confused:

Everything works fine for me.

You just seem to have problems with everything.

1 Like

BTW the link on prefecture for garages still isnt working since you put this back up

Thanks you , i fixed it

Np. Any idea on why when i try to register a vehicle it doesn’t say anything or do anything also when i buy a license it doesn’t take money?

I am testing a fix for the licenses not taking money now ill update this post when finished.

Line 76 in server.lua he calls a check for his own version of essentialmode lol or it could just be an error idk really.

TriggerEvent('ply_essentialmode:getPlayerFromId', source, function(user)

anyway replacethat line with this:

		TriggerEvent('es:getPlayerFromId', source, function(user)

thanks alot man now i just have to fix my veh shop now taking money and reging the veh in prefecture haha

This issue is about the prefecture mod, not garages mod, so why are you here?

I dont know he posted it here so i helped him here :frowning: 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?

If he doesnt reply just make a post on the re-release version thread and ill help you with his, he doesnt want me helping people for his scripts

@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?

Nope, when you set out your car, the only way to set in it is to set it in by the garage. Untill the server restart.

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)

And this on the server:

RegisterServerEvent('TimedRestart')
AddEventHandler('TimedRestart', function()
	resetOnStart()
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.

1 Like

No problem man, I will throw this on and see what happens, Thanks @Sighmir

I do not understand what the purpose of this is.

Player have to re update their vehicle themself. That the way the roleplay works.

RegisterServerEvent('TimedRestart')
AddEventHandler('TimedRestart', function()
	resetOnStart()
end)

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.

I added a marker that makes a user pay money to be able to take out another vehicle after they have lost one.

Maybe an insurance system is needed.