Value from server

Hi,

I’m basically wanting this script to ask the server for a value, a job name for example (which the server gets through SQL). I’ve got this but it doesn’t work, is there a way to do this?

Server:

RegisterServerEvent('js_jobs:getJob')
AddEventHandler('js_jobs:getJob', function()
	MySQL.Async.fetchAll("SELECT * FROM `gta5_new`.`users` WHERE `identifier` = '"..user.identifier.."';", '', function(result)
		TriggerClientEvent("js_jobs:sendInfo", result[0].job)
	end)
end)

Client

TriggerServerEvent("js_jobs:getJob")
	RegisterNetEvent('js_jobs:sendInfo')
	AddEventHandler('js_jobs:sendInfo', function(result)
		result = job
	end)

	if job == 'Police' then
		-- DO SOMETHING
	end

Any help would be appreciated! Looking to implement this in more places than just jobs.

It should be job = result. Programming 101 my dude

Less programming 101 and more a simple mistake i failed to notice, I’ll check if it works changed tomorrow