I’m making a job, it works (import/export vehicle job) I’m just trying to get the system to pay once when the person gets to the destination. I currently use
client:
TriggerServerEvent("importJob:addMoney", distance)
server
AddEventHandler('importJob:addMoney', function(amount)
-- Get the players money amount
TriggerEvent('es:getPlayerFromId', source, function(user)
total = math.random(900, 5000);
-- update player money amount
user:addMoney((total + tonumber(math.floor(amount)) + 0.0))
end)
end)
for the script. When the job is finished, it doesn’t pay the person, I feel I’m doing everything correct, unless if I’m being blind…