From 09abb9c45050abb12a19eef0fd4bd26c9290d228 Mon Sep 17 00:00:00 2001 From: Tony <97451137+TonybynMp4@users.noreply.github.com> Date: Thu, 24 Mar 2022 16:46:52 +0100 Subject: [PATCH 1/4] Add Joining server translations --- locale/en.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/locale/en.lua b/locale/en.lua index b9d91ae..202d41b 100644 --- a/locale/en.lua +++ b/locale/en.lua @@ -7,7 +7,10 @@ local Translations = { no_access = 'No access to this command', company_too_poor = 'Your employer is broke', item_not_exist = 'Item does not exist', - too_heavy = 'Inventory too full' + too_heavy = 'Inventory too full', + duplicate_license = 'Duplicate Rockstar License Found', + no_valid_license = 'No Valid Rockstar License Found', + not_whitelisted = 'You\'re not whitelisted for this server' }, success = {}, info = { @@ -15,7 +18,10 @@ local Translations = { job_info = 'Job: %{value} | Grade: %{value2} | Duty: %{value3}', gang_info = 'Gang: %{value} | Grade: %{value2}', on_duty = 'You are now on duty!', - off_duty = 'You are now off duty!' + off_duty = 'You are now off duty!', + checking_ban = 'Hello %s. We are checking if you are banned.', + join_server = 'Welcome %s to {Server Name}.', + checking_whitelisted = 'Hello %s. We are checking your allowance.' } } From 12082f48b89321d03067f658ad7430a7138a2dd7 Mon Sep 17 00:00:00 2001 From: Tony <97451137+TonybynMp4@users.noreply.github.com> Date: Thu, 24 Mar 2022 16:51:21 +0100 Subject: [PATCH 2/4] Update fr.lua --- locale/fr.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/locale/fr.lua b/locale/fr.lua index 2a838c7..42423c8 100644 --- a/locale/fr.lua +++ b/locale/fr.lua @@ -7,7 +7,10 @@ local Translations = { no_access = 'Vous n\'avez pas accès à cette commande', company_too_poor = 'Votre entreprise n\'a pas suffisamment d\'argent', item_not_exist = 'L\'objet n\'existe pas', - too_heavy = 'L\'inventaire est plein' + too_heavy = 'L\'inventaire est plein', + duplicate_license = 'License Rockstar Dupliquée trouvée', + no_valid_license = 'Aucune License Rockstar trouvée', + not_whitelisted = "Vous n'êtes pas whitelist sur ce serveur" }, success = {}, info = { @@ -15,7 +18,11 @@ local Translations = { job_info = 'Emplois: %{value} | Grade: %{value2} | Service: %{value3}', gang_info = 'Gang: %{value} | Grade: %{value2}', on_duty = 'Vous êtes désormais en service!', - off_duty = 'Vous n\'êtes plus en service!' + off_duty = 'Vous n\'êtes plus en service!', + checking_ban = 'Bonjour %s. Nous verifions si vous êtes banni.', + validatin_license = 'bonjour %s. Nous validons votre License Rockstar.', + join_server = 'Bienvenue %s sur {Server Name}.', + checking_whitelisted = 'Bonjour %s. Nous vérifions si vous êtes Whitelist.' } } From 8265bf172073bcb6a7378b1980efdad83cb493b4 Mon Sep 17 00:00:00 2001 From: Tony <97451137+TonybynMp4@users.noreply.github.com> Date: Thu, 24 Mar 2022 16:54:50 +0100 Subject: [PATCH 3/4] Update events.lua --- server/events.lua | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/events.lua b/server/events.lua index 5a99f61..6142244 100644 --- a/server/events.lua +++ b/server/events.lua @@ -47,7 +47,7 @@ local function onPlayerConnecting(name, setKickReason, deferrals) deferrals.done(QBCore.Config.Server.ClosedReason) end - deferrals.update(string.format('Hello %s. Validating Your Rockstar License', name)) + deferrals.update(string.format(Lang:t('info.checking_ban'), name)) for _, v in pairs(identifiers) do if string.find(v, 'license') then @@ -59,7 +59,7 @@ local function onPlayerConnecting(name, setKickReason, deferrals) -- Mandatory wait Wait(2500) - deferrals.update(string.format('Hello %s. We are checking your allowance.', name)) + deferrals.update(string.format(Lang:t('info.checking_whitelisted'), name)) local isBanned, Reason = QBCore.Functions.IsPlayerBanned(src) local isLicenseAlreadyInUse = QBCore.Functions.IsLicenseInUse(license) @@ -67,17 +67,16 @@ local function onPlayerConnecting(name, setKickReason, deferrals) Wait(2500) - deferrals.update(string.format('Welcome %s to {Server Name}.', name)) + deferrals.update(Lang:t('info.join_server'), name)) if not license then - deferrals.done('No Valid Rockstar License Found') + deferrals.done(Lang:t('error.no_valid_license')) else elseif isBanned then deferrals.done(Reason) elseif isLicenseAlreadyInUse and QBCore.Config.Server.CheckDuplicateLicense then - deferrals.done('Duplicate Rockstar License Found') + deferrals.done(Lang:t('error.duplicate_license')) elseif isWhitelist and not whitelisted then - deferrals.done('You\'re not whitelisted for this server') - else + deferrals.done(Lang:t('error.not_whitelisted')) else deferrals.done() if QBCore.Config.Server.UseConnectQueue then Wait(1000) From 98b1d10504675d7b54fe9c45520af4cb36a6731b Mon Sep 17 00:00:00 2001 From: Tony <97451137+TonybynMp4@users.noreply.github.com> Date: Thu, 24 Mar 2022 16:59:51 +0100 Subject: [PATCH 4/4] Typo --- server/events.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/events.lua b/server/events.lua index 6142244..867115f 100644 --- a/server/events.lua +++ b/server/events.lua @@ -70,13 +70,14 @@ local function onPlayerConnecting(name, setKickReason, deferrals) deferrals.update(Lang:t('info.join_server'), name)) if not license then - deferrals.done(Lang:t('error.no_valid_license')) else + deferrals.done(Lang:t('error.no_valid_license')) elseif isBanned then deferrals.done(Reason) elseif isLicenseAlreadyInUse and QBCore.Config.Server.CheckDuplicateLicense then deferrals.done(Lang:t('error.duplicate_license')) elseif isWhitelist and not whitelisted then - deferrals.done(Lang:t('error.not_whitelisted')) else + deferrals.done(Lang:t('error.not_whitelisted')) + else deferrals.done() if QBCore.Config.Server.UseConnectQueue then Wait(1000)