mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 00:01:22 +00:00
Merge branch 'main' into patch-3
This commit is contained in:
+2
-1
@@ -7,7 +7,8 @@ version '1.1.0'
|
||||
shared_scripts {
|
||||
'config.lua',
|
||||
'shared/locale.lua',
|
||||
'locale/en.lua', -- replace with desired language
|
||||
'locale/en.lua',
|
||||
'locale/*.lua',
|
||||
'shared/main.lua',
|
||||
'shared/items.lua',
|
||||
'shared/jobs.lua',
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'ar' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'bg' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'cn' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'cs' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'da' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -118,7 +118,10 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'de' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'ee' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
Lang = Lang or Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
|
||||
+99
-8
@@ -8,15 +8,20 @@ local Translations = {
|
||||
company_too_poor = 'Tu empleador está en bancarrota',
|
||||
item_not_exist = 'El objeto no existe',
|
||||
too_heavy = 'No hay espacio en tu inventario',
|
||||
location_not_exist = 'La ubicación no existe',
|
||||
duplicate_license = 'Licencia de Rockstar duplicada',
|
||||
no_valid_license = 'No tienes una licencia de Rockstar válida',
|
||||
not_whitelisted = 'No tienes acceso a este servidor',
|
||||
server_already_open = 'El servidor ya está abierto',
|
||||
server_already_closed = 'El servidor ya está cerrado'
|
||||
server_already_closed = 'El servidor ya está cerrado',
|
||||
no_permission = 'No tienes permisos para esto..',
|
||||
no_waypoint = 'No hay waypoint establecido.',
|
||||
tp_error = 'Error mientras se teletransporta.',
|
||||
},
|
||||
success = {
|
||||
server_opened = 'El servidor ha sido abierto',
|
||||
server_closed = 'El servidor ha sido cerrado'
|
||||
server_closed = 'El servidor ha sido cerrado',
|
||||
teleported_waypoint = 'Teletransportado a punto de encuentro.',
|
||||
},
|
||||
info = {
|
||||
received_paycheck = 'Has recibido tu salario de $%{value}',
|
||||
@@ -26,11 +31,97 @@ local Translations = {
|
||||
off_duty = '¡Estás fuera de servicio!',
|
||||
checking_ban = 'Hola %s. Estamos revisando la lista de baneos.',
|
||||
join_server = 'Bienvenid@ a {Server Name}, %s.',
|
||||
checking_whitelisted = 'Hola %s. Estamos revisando si tienes acceso a nuestro servidor.'
|
||||
}
|
||||
checking_whitelisted = 'Hola %s. Estamos revisando si tienes acceso a nuestro servidor.',
|
||||
exploit_banned = 'Has sido expulsado por hacer trampas. Consulta nuestro Discord para más información: %{discord}',
|
||||
exploit_dropped = 'Has sido expulsado por hacer trampas',
|
||||
},
|
||||
command = {
|
||||
tp = {
|
||||
help = 'TP al jugador o a las coordenadas (sólo para admin)',
|
||||
params = {
|
||||
x = { name = 'id/x', help = 'ID de jugador o posición X'},
|
||||
y = { name = 'y', help = 'Y posición'},
|
||||
z = { name = 'z', help = 'Z posición'},
|
||||
},
|
||||
},
|
||||
tpm = { help = 'TP al marcador (sólo para admin)' },
|
||||
togglepvp = { help = 'Activar el PVP en el servidor (sólo para admin)' },
|
||||
addpermission = {
|
||||
help = 'Dar permisos al jugador (sólo modo Dios)',
|
||||
params = {
|
||||
id = { name = 'id', help = 'ID del jugador' },
|
||||
permission = { name = 'permission', help = 'Nivel de permiso' },
|
||||
},
|
||||
},
|
||||
removepermission = {
|
||||
help = 'Eliminar los permisos de los jugadores (sólo modo Dios)',
|
||||
params = {
|
||||
id = { name = 'id', help = 'ID del jugador' },
|
||||
permission = { name = 'permission', help = 'Nivel de permiso' },
|
||||
},
|
||||
},
|
||||
openserver = { help = 'Abrir el servidor para todo el mundo (sólo para admin)' },
|
||||
closeserver = {
|
||||
help = 'Cerrar el servidor para personas sin permisos (sólo para admin)',
|
||||
params = {
|
||||
reason = { name = 'reason', help = 'Motivo del cierre (opcional)' },
|
||||
},
|
||||
},
|
||||
car = {
|
||||
help = 'Crear Vehículo (sólo para admin)',
|
||||
params = {
|
||||
model = { name = 'model', help = 'Nombre del modelo del vehículo' },
|
||||
},
|
||||
},
|
||||
dv = { help = 'Borrar vehículo (sólo para admin)' },
|
||||
givemoney = {
|
||||
help = 'Dar dinero a un jugador (sólo para admin)',
|
||||
params = {
|
||||
id = { name = 'id', help = 'ID del jugador' },
|
||||
moneytype = { name = 'moneytype', help = 'Tipo de dinero (efectivo, banco, cripto)' },
|
||||
amount = { name = 'amount', help = 'Cantidad de dinero' },
|
||||
},
|
||||
},
|
||||
setmoney = {
|
||||
help = 'Establecer la cantidad de dinero de los jugadores (sólo para admin)',
|
||||
params = {
|
||||
id = { name = 'id', help = 'ID del jugador' },
|
||||
moneytype = { name = 'moneytype', help = 'Tipo de dinero (efectivo, banco, cripto)' },
|
||||
amount = { name = 'amount', help = 'Cantidad de dinero' },
|
||||
},
|
||||
},
|
||||
job = { help = 'Compruebe su trabajo' },
|
||||
setjob = {
|
||||
help = 'Establecer un trabajo de jugador (sólo para admin)',
|
||||
params = {
|
||||
id = { name = 'id', help = 'ID del jugador' },
|
||||
job = { name = 'job', help = 'Nombre del trabajo' },
|
||||
grade = { name = 'grade', help = 'Grado de trabajo' },
|
||||
},
|
||||
},
|
||||
gang = { help = 'Comprueba tu banda' },
|
||||
setgang = {
|
||||
help = 'Establecer una banda de jugadores (sólo para admin)',
|
||||
params = {
|
||||
id = { name = 'id', help = 'ID del jugador' },
|
||||
gang = { name = 'gang', help = 'Nombre de la banda' },
|
||||
grade = { name = 'grade', help = 'Grado de banda' },
|
||||
},
|
||||
},
|
||||
ooc = { help = 'Mensaje del chat OOC' },
|
||||
me = {
|
||||
help = 'Mostrar mensaje local',
|
||||
params = {
|
||||
message = { name = 'message', help = 'Mensaje a enviar' }
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'es' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'et' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'fa' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'fi' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -120,7 +120,10 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'fr' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'ge' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+8
-4
@@ -118,7 +118,11 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'he' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'hu' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'in' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -118,7 +118,10 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'is' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -123,7 +123,10 @@ error = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'it' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'lv' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'nl' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'pl' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'pt-br' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'pt' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -115,7 +115,10 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'ro' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'rs' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -118,7 +118,10 @@ local Translations = {
|
||||
},
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'ru' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'sl' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'sv' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'th' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -25,7 +25,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'tr' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+7
-4
@@ -19,7 +19,10 @@ local Translations = {
|
||||
}
|
||||
}
|
||||
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true
|
||||
})
|
||||
if GetConvar('qb_locale', 'en') == 'vn' then
|
||||
Lang = Locale:new({
|
||||
phrases = Translations,
|
||||
warnOnMissing = true,
|
||||
fallbackLang = Lang,
|
||||
})
|
||||
end
|
||||
|
||||
+6
-6
@@ -297,8 +297,8 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'AddMoney', 'lightgreen', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') added, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
||||
end
|
||||
TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, amount, false)
|
||||
TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "add")
|
||||
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "add")
|
||||
TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "add", reason)
|
||||
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "add", reason)
|
||||
end
|
||||
|
||||
return true
|
||||
@@ -330,8 +330,8 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||
if moneytype == 'bank' then
|
||||
TriggerClientEvent('qb-phone:client:RemoveBankMoney', self.PlayerData.source, amount)
|
||||
end
|
||||
TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "remove")
|
||||
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "remove")
|
||||
TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "remove", reason)
|
||||
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "remove", reason)
|
||||
end
|
||||
|
||||
return true
|
||||
@@ -350,8 +350,8 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
|
||||
self.Functions.UpdatePlayerData()
|
||||
TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'SetMoney', 'green', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')** $' .. amount .. ' (' .. moneytype .. ') set, new ' .. moneytype .. ' balance: ' .. self.PlayerData.money[moneytype] .. ' reason: ' .. reason)
|
||||
TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, moneytype, math.abs(difference), difference < 0)
|
||||
TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "set")
|
||||
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "set")
|
||||
TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, moneytype, amount, "set", reason)
|
||||
TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, moneytype, amount, "set", reason)
|
||||
end
|
||||
|
||||
return true
|
||||
|
||||
+10
-1
@@ -32,7 +32,13 @@ end
|
||||
--- @return Locale
|
||||
function Locale:new(opts)
|
||||
setmetatable(self, Locale)
|
||||
self.warnOnMissing = opts.warnOnMissing or true
|
||||
|
||||
self.fallback = opts.fallbackLang and Locale.new({}, {
|
||||
warnOnMissing = false,
|
||||
phrases = opts.fallbackLang.phrases,
|
||||
}) or false
|
||||
|
||||
self.warnOnMissing = type(opts.warnOnMissing) ~= 'boolean' and true or opts.warnOnMissing
|
||||
|
||||
self.phrases = {}
|
||||
self:extend(opts.phrases or {})
|
||||
@@ -98,6 +104,9 @@ function Locale:t(key, subs)
|
||||
if self.warnOnMissing then
|
||||
print(('^3Warning: Missing phrase for key: "%s"'):format(key))
|
||||
end
|
||||
if self.fallback then
|
||||
return self.fallback:t(key, subs)
|
||||
end
|
||||
result = key
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user