How would i got about linking esx_lscustoms and esx_mecanojob

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)

RegisterServerEvent('esx_lscustom:buyMod')
AddEventHandler('esx_lscustom:buyMod', function(price)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	price = tonumber(price)
	if price > xPlayer.getMoney() then
		TriggerClientEvent('esx_lscustom:cancelInstallMod', _source)
		TriggerClientEvent('esx:showNotification', _source, _U('not_enough_money'))
	else
		xPlayer.removeMoney(price)
		TriggerClientEvent('esx_lscustom:installMod', _source)
		TriggerClientEvent('esx:showNotification', _source, _U('purchased'))
	end
end)

RegisterServerEvent('esx_lscustom:refreshOwnedVehicle')
AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(myCar)

	MySQL.Async.execute(
		'UPDATE `owned_vehicles` SET `vehicle` = @vehicle WHERE `vehicle` LIKE "%' .. myCar['plate'] .. '%"',
		{
			['@vehicle'] = json.encode(myCar)
		}
	)
end)```



i would like this instead of taking money from the player but to CHECK and take money from society_mecano.

if someone is able to help me go about doing that that would be appreciated heaps thanks.

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