feat (main): Pulling main into dev. (#542)

* Update README.md

* Update README.md

* feat (locale/tr): Added turkish locale.

Türkçe Karakter Yer Almakta

* feat (locale/es): Added spanish.

* updated spanish

Sounded weird

* Update es.lua

* feat (locale/lv): Added latvian.

I'm personally a native speaker and I can approve this is correct.

* feat(qb-core/player): Added server-side event onJobUpdate (#516)

Added server-side event onJobUpdate so scripts can listen on server if any player changed their job. It's safer than redirecting client event to server again.

* feat (server/player): Added Job update on duty update (#519)

* Trigger Job Update on Duty Update

* Add server event

Co-authored-by: Kakarot <57848836+GhzGarage@users.noreply.github.com>
Co-authored-by: Muhammed Developer <56224780+muhammed10100@users.noreply.github.com>
Co-authored-by: MonkeyWhisper <82112471+MonkeyWhisper@users.noreply.github.com>
Co-authored-by: Casper <71441748+JajarGaming@users.noreply.github.com>
Co-authored-by: Chaini <28576404+chainiDV@users.noreply.github.com>
Co-authored-by: Brady F <bmf1418@gmail.com>
This commit is contained in:
Idris Dev
2022-02-21 15:00:02 +11:00
committed by GitHub
parent 707a43d4b8
commit fa99bf0339
4 changed files with 56 additions and 1 deletions
+3 -1
View File
@@ -2,6 +2,8 @@ local Translations = {
error = {
not_online = 'El jugador no está conectado!',
wrong_format = 'Formato incorrecto!',
missing_args = 'No todos los argumentos estan presente! (x, y, z)',
missing_args2 = 'Todos los argumentos tienen que estar presente!',
missing_args = 'No todos los argumentos estan presentes! (x, y, z)',
missing_args2 = 'Todos los argumentos deben estar presentes!',
no_access = 'No tienes acceso a este comando!',
@@ -13,7 +15,7 @@ local Translations = {
info = {
received_paycheck = 'Has recibido tu pago de $%{value}',
job_info = 'Trabajo: %{value} | Grado: %{value2} | Estado: %{value3}',
gang_info = 'Banda: %{value} | Grado: %{value2}',
gang_info = 'Pandilla: %{value} | Grado: %{value2}',
on_duty = 'Ahora estás en servicio!',
off_duty = 'Ahora estás fuera de servicio!'
}
+25
View File
@@ -0,0 +1,25 @@
local Translations = {
error = {
not_online = 'Spēlētājs nav online',
wrong_format = 'Nepareizs formāts',
missing_args = 'Ne visi argumenti tika ievadīti (x, y, z)',
missing_args2 = 'Visiem argumentiem ir jābut aizpildītiem!',
no_access = 'Nav piekļuve šai commandai',
company_too_poor = 'Jūsu darba vedējs ir nabadzīgs',
item_not_exist = 'Šī lieta nēeksistē',
too_heavy = 'Inventārs ir pārāk pilns'
},
success = {},
info = {
received_paycheck = 'Jūs esat saņēmuši savu algu par $%{value}',
job_info = 'Darbs: %{value} | Pakāpe: %{value2} | Pienākums: %{value3}',
gang_info = 'Banda: %{value} | Pakāpe: %{value2}',
on_duty = 'Jūs tagad esat dienestā!',
off_duty = 'Jūs tagad esat atbrīvots no dienesta!'
}
}
Lang = Locale:new({
phrases = Translations,
warnOnMissing = true
})
+25
View File
@@ -0,0 +1,25 @@
local Translations = {
error = {
not_online = 'Oyuncu çevrimiçi değil',
wrong_format = 'Yanlış birim',
missing_args = 'Her argüman girilmedi (x, y, z)',
missing_args2 = 'Tüm argümanlar doldurulmalıdır!',
no_access = 'Bu komuta erişim yok',
company_too_poor = 'İşvereniniz bozuk',
item_not_exist = 'Öğe mevcut değil',
too_heavy = 'Envanter çok dolu'
},
success = {},
info = {
received_paycheck = 'Maaş çekinizi aldınız $%{value}',
job_info = 'İş: %{value} | Seviye: %{value2} | Görev: %{value3}',
gang_info = 'Çete: %{value} | Seviye: %{value2}',
on_duty = 'Şimdi görev başındasın!',
off_duty = 'Şimdi görevden alındın!'
}
}
Lang = Locale:new({
phrases = Translations,
warnOnMissing = true
})
+3
View File
@@ -196,6 +196,7 @@ function QBCore.Player.CreatePlayer(PlayerData)
end
self.Functions.UpdatePlayerData()
TriggerEvent('QBCore:Server:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
TriggerClientEvent('QBCore:Client:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
return true
end
@@ -233,6 +234,8 @@ function QBCore.Player.CreatePlayer(PlayerData)
self.Functions.SetJobDuty = function(onDuty)
self.PlayerData.job.onduty = onDuty
self.Functions.UpdatePlayerData()
TriggerEvent('QBCore:Server:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
TriggerClientEvent('QBCore:Client:OnJobUpdate', self.PlayerData.source, self.PlayerData.job)
end
self.Functions.SetMetaData = function(meta, val)