Merge pull request #579 from TonybynMp4/TonybynMp4-Translations

Add Joining Server Translations
This commit is contained in:
Kakarot
2022-04-13 05:31:20 -07:00
committed by GitHub
3 changed files with 23 additions and 10 deletions
+6 -6
View File
@@ -34,7 +34,7 @@ local function onPlayerConnecting(name, setKickReason, deferrals)
end
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
@@ -46,7 +46,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)
@@ -54,16 +54,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'))
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')
deferrals.done(Lang:t('error.not_whitelisted'))
else
deferrals.done()
if QBCore.Config.Server.UseConnectQueue then