[H@mer] Garage (GTA:O Style)

A script by HamerTH

No reviews yet.
[H@mer] Garage (GTA:O Style) main image

Full Description

Thumbnail

Config

QBCore example

Config.LoadGarage = function(source) -- When player no vehicle press E into garage.
	local mysql = MySQL.Sync.fetchAll('SELECT vehicle, mods, plate FROM `player_vehicles` WHERE steam= @steam',
	{
		['@steam'] = GetIdentifier(source),
	})

	local VehData = {}
	for k,v in pairs(mysql) do
		table.insert(VehData, { -- This is data using in clinet, just change MySQL query and push data on this.
			model = v.vehicle, -- string or number, Example is Bmx ("bmx" or 1131912276)
			plate = v.plate, -- string of vehicle plate, Example ("AAA 116")
			mod = Config.GetVehicleMod(v.mods), -- Set vehicle mod data. (readme props.lua)
		})
	end
	return VehData
end

ESX eample.

Config.LoadGarage = function(source) -- When player no vehicle press E into garage.
	local mysql = MySQL.Sync.fetchAll('SELECT vehicle FROM `owned_vehicles` WHERE identifier = @identifier',
	{
		['@identifier'] = GetIdentifier(source),
	})

	local VehData = {}
	for k,v in pairs(mysql) do
		local vehicle = json.decode(v.vehicle)
		
		table.insert(VehData, { -- This is data using in clinet, just change MySQL query and push data on this.
			model = vehicle.model, -- string or number, Example is Bmx ("bmx" or 1131912276)
			plate = vehicle.plate, -- string of vehicle plate, Example ("AAA 116")
			mod = Config.GetVehicleMod(vehicle), -- Set vehicle mod data. (readme props.lua)
		})
		
	end
	return VehData
end

Info

  • Easy Config.
  • No database change.
  • Example database file.
  • Test on exp, vrp, qbcore.
  • No capacity limit (use elevator).
  • Display vehicle info.

Buy On Tebex

Code is accessible No
Subscription-based No
Lines (approximately) 1000
Requirements oxmysql or fivem-mysql-async
Support Yes