ESx Society - limiting who can wash money

HI
how can I limit which faction can wash money in esx society?

I tried this:… but it does not work … its from esx_society/client/main.lua

	if options.wash and ESX.PlayerData.job == 'unicorn' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
	end
	
	if options.wash and ESX.PlayerData.job == 'cardealer' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
	end
	
	if options.wash and ESX.PlayerData.job == 'Bahamas' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
	end
	
	if options.wash and ESX.PlayerData.job == 'vigne' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
	end
	
	if options.wash and ESX.PlayerData.job == 'taxi' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
	end

Wash option does not appear in the boss menu… why? Should I use elseif ? Thanks

OK it need to be like this

if options.wash and ESX.PlayerData.job.name == 'unicorn' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})
		
	elseif options.wash and ESX.PlayerData.job.name == 'cardealer' then
		table.insert(elements, {label = _U('wash_money'), value = 'wash_money'})

	end
 

Maybe someone will want this too…

4 Likes

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