From b92f0ffebd38a6a9c382b1651dd642e412a8e535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sun, 3 Sep 2017 13:54:36 +0200 Subject: [PATCH] Fix translation + fix setJob --- locales/fr.lua | 2 +- server/main.lua | 29 +++++++++++++---------------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/locales/fr.lua b/locales/fr.lua index 6b388e3e..1ab0af24 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -3,7 +3,7 @@ Locales['fr'] = { ['actions'] = 'actions', ['deposit_amount'] = 'montant du dépôt', ['deposit_society_money'] = 'déposer argent société', - ['do_you_want_to_recruit'] = 'Voulez-vous recruter ~g~ ?', + ['do_you_want_to_recruit'] = 'Voulez-vous recruter %s ?', ['employee'] = 'employé', ['employee_list'] = 'liste des employés', ['employee_management'] = 'gestion employés', diff --git a/server/main.lua b/server/main.lua index 3376af76..8ff83079 100644 --- a/server/main.lua +++ b/server/main.lua @@ -153,25 +153,22 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier local xPlayer = ESX.GetPlayerFromIdentifier(identifier) - if xPlayer == nil then - - MySQL.Async.execute( - 'UPDATE users SET job = @job, job_grade = @job_grade WHERE identifier = @identifier', - { - ['@job'] = job, - ['@job_grade'] = grade, - ['@identifier'] = identifier - }, - function(rowsChanged) - cb() - end - ) - - else + if xPlayer ~= nil then xPlayer.setJob(job, grade) - cb() end + MySQL.Async.execute( + 'UPDATE users SET job = @job, job_grade = @job_grade WHERE identifier = @identifier', + { + ['@job'] = job, + ['@job_grade'] = grade, + ['@identifier'] = identifier + }, + function(rowsChanged) + cb() + end + ) + end) ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary)