Esx_property + esx_garage (merger)

Not sure how many people are looking for something like this but, for the last few days or so, probably closer to a week I suspect, I’ve been trying to use clever scripting techniques to merge these resources and configure them to work together. I did successfully merge their scripts with very little damage (disabled esx_garage in server config, disabled ImaginationCt garage in resource Config).

In fact, I was able to fix up a few things, for example when you would buy a house it would display the wrong notification, as if you’d rented. Fixed that one, as it was quite annoying, but it had to be done through the mysql, so your owned_properties database WILL require one new table structure called ‘bought’. I disabled ImaginationCt garage because it was interfering with 2 new garages I added for NorthConker2044 and 2045. I was able to use clever scripting to tie these 2 new garages to the appropriate property upon player spawning, purchasing, renting, moving out of, and selling the property by adding a unique identifier to the Config.Garages table, and using this identifier to make true and false for the v.IsClosed disability trigger: Example

  for k,v in pairs(Config.Garages) do
  	if v.GarageNum == 7 and property.name == 'NorthConkerAvenue2045' then
  		v.IsClosed7 = true
  	elseif v.GarageNum == 8 and property.name == 'NorthConkerAvenue2044' then
  		v.IsClosed8 = true
  	end
  end

One new table structure entry in user_parkings called ‘garage’ this may or may not be needed, I’ll have to once over it again during cleanup.

If anyone is interested, I can (freely of course) release the full esx_property resource files, once I finish setting up garages for the rest of the properties in stock esx_property, just drop a comment if interested. I don’t know much about exporting mysql, but I can provide all the information necessary to create and properly format the table structure entry(ies) for the merger.

Known bugs:
-Other players may be able to enter your garage (probably easy fix, check owner/player id) Update: I’ve put a client side feature to lock/unlock the garage using the same technique quoted above. Eventually will put this on a server trigger so the locked state is saved when you rejoin. Right now you have to lock garages every time you rejoin.

-Selling the house does NOT clear the garage of your personal vehicles (will look into it)

-Sell modifier not working properly at the moment (trying to emulate market fluctuation/randomizer) but works well enough, as sometimes there is a sale of positive equity.

-Enter/Exit points may be too high off the ground, which causes the vehicle to “barrel roll” when coming out of the garage. Fix: Release the trigger/accelerator and the car will drop to the ground. (will try to fix by reducing the ground clearance of the x,y,z coords and/or creating a Wait(1000) accelerator trigger disabler/enabler)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.