[RE-RELEASE] garages async/couchdb

Everyone send you love to kanersps for creating the es_garages script!

Full credits go to Plysken_Rayder for making ply_garages, and ply_prefecture

I removed es_garages until i get permission to post that script, sorry i forgot to remove it before.

I did not make these scripts I am just releasing modified versions of them and this is a beta version. I am mainly releasing them right now because he made me mad by threatening me and telling me i had no rights to modify or release them. Because of this here are the files.

but its ok because here are the files to the modified car system

this is a system that when you buy a car from es_garages you can register it and store it via this system, now this is a beta version and im only releasing it right now because he pissed me off heavily with his message sayign i was violating his right blah blah blah as you can see by the github ToS i am not

  1. License Grant to Other Users

Any Content you post publicly, including issues, comments, and contributions to other Usersā€™ repositories, may be viewed by others. By setting your repositories to be viewed publicly, you agree to allow others to view and ā€œforkā€ your repositories (this means that others may make their own copies of your Content in repositories they control).

If you set your pages and repositories to be viewed publicly, you grant each User of GitHub a nonexclusive, worldwide license to access your Content through the GitHub Service, and to use, display and perform your Content, and to reproduce your Content solely on GitHub as permitted through GitHubā€™s functionality. You may grant further rights if you adopt a license.

2 Likes

He made you mad, By telling you not to modify then release his workā€¦ Im not surprised! xD

Might want to you know, Remove this before the community eat you.

Kind of disrespectful if you ask me.

no he made me mad not because of that, he made me mad because he told me he reported me and demanding i not release modified script files even with props to him, and if he would have just asked me not to and was nice about it i would not have chosen this route. then spewed some stuff about licenses when he released his stuff on github.

I mean i get he may have upset you, He is just proud of his work, Instead of releasing it this way, Comment on his main thread with the code you added/changed :slight_smile:

This seems rather childish and i dont want to see it cause issues across the FiveM forum.

You should have respected him and his choice.

Also you havnt even mentioned what this script does?
What have you chagned?

I tried to comment on his main thread but apparently he removed the thread. Even before it was removed though i was going to release it there but he told everyone to make your own thread.

Doing things this way was not my first option or intention, but its just how it had to be

I mean if you want to do it this way fair enough, Its not right but okay.

At least tell us what this version does?
What have you done to it to make it different from the original scripts?

Will you keep it up to date with the original script?

I dont think itā€™s the right thing to do, But it is what it is :slight_smile:

This place needs people like rjross2013, heā€™s trying to help the couchDB users by making scripts that donā€™t work with couchDB, work.

Heā€™s already got the es_weashop script working with couchDB, the author of that script was happy for it to be edited.

As we can see ply has no interest in helping couchDB users and if others can help out making it work then surely thatā€™s a good thing.

1 Like

Hey man, just a suggestion: edit thos post and remove all the salt. This is a public community where public scripts are ALLOWED to be edited so you dont have to worry about it getting removed, you are helping a lot by editing this for people like me.

Can you add a guide on exactly how to install it?

1 Like

Yea im sorry about the saltyness, but hey i try. anyway this script uses a modified version of es_garages, ply_garages, ply_prefecture, vdk_truck. these come together to make a system that lets you use es_garages to buy vehicles then use them unregistered for crimes, or you can register them and use the ply_garages which will be blue on the minimap.

Now this system is in beta like i said but i will be updating them with any updates that may happen so dont worry about that :slight_smile:

as for anyone who thinks this is wrong, i am truly sorry i tried many other ways, but if he wont let me help others with his scripts than i cant abide by his request.

1 Like

I looked inside and I see SQL files? Didnā€™t you migrate it to CouchDB?

You can install these just by dragging and dropping all these scripts into your resources folder and add each of them indevidually into the yml file for autostart. you do have to have a mysql database and mysql-async as well as a couchdb server. then import all the sql files into your database except for sqlof13.06.17.sql located in ply_garages.

Works with Essentialmode 3.2.3?

My goal is not to convert everything to just couchdb it is to add support inside of scripts that use mysql-async for scripts that use couchdb. For instance if a script that relies on 2 scripts say vdk_inventory and an old version of a weapon shop, i would convert the weapon shop but leave the mysql-async in for vdk_inventory because its not broke. I only convert things that will break otherwise.

I have everything except mysql Async. How do I set that up?

yes this works with essentialsmode 3.x.x

mysql async is litterally just drag and drop then you add you db info to it here is the thread:

What exactly is the point in MySQL Async?

it is just a way to have mysql api without essentialsmode 2.0 plus it breaks way less and you dont have to put you db info in every scripts

So wait the ply_garages is not couchdb?

no, it used to be only mysql-async untill i made it work for es_garages and it only works for es_garages currently thats why i included it in the pack, this is meant to be a standalone car system complete with buying storing and saving vehicles

oh and btw guys if you whant the police script to work with the license plates replace
AddEventHandler(ā€˜police:checkingPlateā€™, function(plate)

blah
blah
blah

end)

with

AddEventHandler('police:checkingPlate', function(plate)

	if(db.driver == "mysql") then
		local executed_query = MySQL:executeQuery("SELECT Nom FROM user_vehicle JOIN users ON user_vehicle.identifier = users.identifier WHERE vehicle_plate = '@plate'", { ['@plate'] = plate })
		local result = MySQL:getResults(executed_query, { 'Nom' }, "identifier")
		if (result[1]) then
			for _, v in ipairs(result) do
				TriggerClientEvent("police:notify", source, "CHAR_ANDREAS", 1, txt[config.lang]["title_notification"], false, txt[config.lang]["vehicle_checking_plate_part_1"]..plate..txt[config.lang]["vehicle_checking_plate_part_2"] .. v.Nom..txt[config.lang]["vehicle_checking_plate_part_3"])
			end
		else
			TriggerClientEvent("police:notify", source, "CHAR_ANDREAS", 1, txt[config.lang]["title_notification"], false, txt[config.lang]["vehicle_checking_plate_part_1"]..plate..txt[config.lang]["vehicle_checking_plate_not_registered"])
		end
	elseif(db.driver == "mysql-async") then
		MySQL.Async.fetchAll("SELECT * FROM user_vehicle WHERE vehicle_plate = @plate", { ['@plate'] = plate }, function (result)
				local isworking = false
				local name = " "
				--TriggerClientEvent("chatMessage", source, "test ", {255, 0, 0}, " " .. tostring(result) .. " " .. tostring(plate))
				for _, v in ipairs(result) do
								--TriggerClientEvent("chatMessage", source, "test ", {255, 0, 0}, " " .. tostring(v.id))
								for i = 0, 31 do
								
								--if NetworkIsPlayerActive( i ) then
								--TriggerClientEvent("chatMessage", source, "test ", {255, 0, 0}, " " .. tostring(v.id))
								--local ids = GetPlayerFromServerId(1)
								--TriggerClientEvent("chatMessage", source, "test ", {255, 0, 0}, " " .. tostring(v.id))
									TriggerEvent('es:getPlayerFromId', i, function(user)
										
											--TriggerClientEvent("chatMessage", source, "test ", {255, 0, 0}, " " .. tostring(v.id))
											if user.identifier == v.identifier then
												name = GetPlayerName(tonumber(i))
												if name ~= " " then
													TriggerClientEvent("police:notify", source, "CHAR_ANDREAS", 1, txt[config.lang]["title_notification"], false, txt[config.lang]["vehicle_checking_plate_part_1"]..plate..txt[config.lang]["vehicle_checking_plate_part_2"] .. name..txt[config.lang]["vehicle_checking_plate_part_3"])
												else
												TriggerClientEvent("police:notify", source, "CHAR_ANDREAS", 1, txt[config.lang]["title_notification"], false, txt[config.lang]["vehicle_checking_plate_part_1"]..plate..txt[config.lang]["vehicle_checking_plate_not_registered"])
												end
											end
										
									end)
									--end
								end
										
								
							
						--end
					
					
				
			
				
			
		end
		end)
	end
	
end)

then replace the function CheckPlate() in menupolice.lua with:


function CheckPlate()
	local pos = GetEntityCoords(GetPlayerPed(-1))
	local entityWorld = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0.0, 20.0, 0.0)

	local rayHandle = CastRayPointToPoint(pos.x, pos.y, pos.z, entityWorld.x, entityWorld.y, entityWorld.z, 10, GetPlayerPed(-1), 0)
	local _, _, _, _, vehicleHandle = GetRaycastResult(rayHandle)
	if(DoesEntityExist(vehicleHandle)) then
		local plate = GetVehicleNumberPlateText(vehicleHandle)
		TriggerServerEvent("police:checkingPlate", plate)
	else
		drawNotification(txt[config.lang]["no_veh_near_ped"])
	end
end