[Release] [ESX] [Mechanic Job]

bro how to make another mechanic job. for example Paleto Mech shop. Separate to city mech shop.?
Thanks in advance

1 Like

go to the database where the society is (addon accounts) or something like that. Make sure there is a society_mechanic or whatever you have named as. and make sure the value is on 1

in database is all okay mate :confused:

Can someone help me figure out how to add clothing to mechanic clockroom?

I want to add multiple service points. What should I do?

i cant tune my cars, how do i do it? or where?

You need to add lscustoms script

What do you mean?

I want to place several places to modifile the car.
Right now, it can only be placed on the ground at once. What do i have to do

Still getting this error even though Iā€™ve changed that. Any other ideas?

You can temporarily disable canCarryItem checks.

go to server/main.lua and find

		-- is there enough in the society?
		if count > 0 and item.count >= count then

			-- can the player carry the said amount of x item?
			if xPlayer.canCarryItem(itemName, count) then
				inventory.removeItem(itemName, count)
				xPlayer.addInventoryItem(itemName, count)
				xPlayer.showNotification(_U('have_withdrawn', count, item.label))
			else
			       xPlayer.showNotification(_U('player_cannot_hold'))
			end

replace with

		-- is there enough in the society?
		if count > 0 and item.count >= count then

			-- can the player carry the said amount of x item?
			-- if xPlayer.canCarryItem(itemName, count) then
				inventory.removeItem(itemName, count)
				xPlayer.addInventoryItem(itemName, count)
				--xPlayer.showNotification(_U('have_withdrawn', count, item.label))
			-- else
			--	xPlayer.showNotification(_U('player_cannot_hold'))
			-- end

find

xPlayer.showNotification(_U('have_deposited', count, item.label))

replace with

--xPlayer.showNotification(_U('have_deposited', count, item.label))

its not the best way of doing it however, it works.

Anyone know how to make the company pay for the modification instead of the mechanic cash? Because everytime player (mechanic) bought the modification, it deduct the money from that person, not from society money.

Where does the confiscated cars go?
i mean, there are eventually cars from players. and if police tells me to conficating a car, so, where is it, if i have to give it back.

Yo everyone. Iā€™ve a issue since 2 weeks now. The script doesnā€™t works anymore for me. I mean I canā€™t see the craft, garage, boss action anymore. At the beginning, I tried to add several garage everywhere on my Japan map then everything disappeared so I redownload the resource to have a fresh one with only the Benny but nothing changeā€¦ I have the last artifact version as well.

Can someone help me?

Thanks.

Anyone have a good idea how to make a second job of this? Combined with LS Customs? :thinking: Not sure how to manage thatā€¦

Hello I have a problem when I launch an NPC mission I never see the vehicle to be towed when I arrive on the area however if I teleport close to the area I see the vehicle and the mission works perfectly. I donā€™t understand where it comes from if anyone has an idea please let me know

Hey I have the same issue, have you fixed it?

bruh hook me up with your server files lol or help me i like yours

Does anyone happen to know how to make it so the money in the mechanics pockets will pay for the upgrades versus the society funds. It is easier for mechanics to do it this way so players pay them, they upgrade and take what they want off the top. Otherwise the boss always has to be on to withdraw and deposit.

Would very much appreciate any help with this! <3
In Server/Main.lua of ESX_LSCUSTOM


UPDATE, TIME TO GIVE BACK, I figured it out:
Take this snippet:

RegisterServerEvent('esx_lscustom:buyMod')
AddEventHandler('esx_lscustom:buyMod', function(price)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	price = tonumber(price)

	if Config.IsMechanicJobOnly then
		local societyAccount

	TriggerEvent('esx_addonaccount:getSharedAccount', 'society_mechanic', function(account)
			societyAccount = account
		end)

		if price < societyAccount.money then
			TriggerClientEvent('esx_lscustom:installMod', _source)
			TriggerClientEvent('esx:showNotification', _source, _U('purchased'))
			societyAccount.removeMoney(price)
		else
			TriggerClientEvent('esx_lscustom:cancelInstallMod', _source)
			TriggerClientEvent('esx:showNotification', _source, _U('not_enough_money'))
		end
	else 
		if price < xPlayer.getMoney() then
			TriggerClientEvent('esx_lscustom:installMod', _source)
			TriggerClientEvent('esx:showNotification', _source, _U('purchased'))
			xPlayer.removeMoney(price)
		else
			TriggerClientEvent('esx_lscustom:cancelInstallMod', _source)
			TriggerClientEvent('esx:showNotification', _source, _U('not_enough_money'))
		end
	end
end)

REPLACE WITH THIS:

RegisterServerEvent('esx_lscustom:buyMod')
AddEventHandler('esx_lscustom:buyMod', function(price)
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	price = tonumber(price)

	if Config.IsMechanicJobOnly then

		if price < xPlayer.getMoney() then
			TriggerClientEvent('esx_lscustom:installMod', _source)
			TriggerClientEvent('esx:showNotification', _source, _U('purchased'))
			xPlayer.removeMoney(price)
		else
			TriggerClientEvent('esx_lscustom:cancelInstallMod', _source)
			TriggerClientEvent('esx:showNotification', _source, _U('not_enough_money'))
		end
	end
end)
2 Likes

Love the scriptā€¦If you want to tow another players vehicle and impound itā€¦is it supposed to be in the menu for vehicle list? if so it does not show upā€¦not sure exactly what im doing wrong or is this not able to be used for player towing/impounding?
thanks