Merge branch 'main' into remove-connectqueue

This commit is contained in:
BerkieBb
2022-07-29 14:04:10 +03:00
committed by GitHub
8 changed files with 237 additions and 42 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ CreateThread(function()
if (QBCore.PlayerData.metadata['hunger'] <= 0 or QBCore.PlayerData.metadata['thirst'] <= 0) and not QBCore.PlayerData.metadata['isdead'] then
local ped = PlayerPedId()
local currentHealth = GetEntityHealth(ped)
local decreaseTreshold = math.random(5, 10)
SetEntityHealth(ped, currentHealth - decreaseTreshold)
local decreaseThreshold = math.random(5, 10)
SetEntityHealth(ped, currentHealth - decreaseThreshold)
end
end
Wait(QBCore.Config.StatusInterval)
+13 -13
View File
@@ -1,27 +1,27 @@
local Translations = {
error = {
not_online = 'El jugador no está en línea',
not_online = 'El jugador no está conectado',
wrong_format = 'Formato incorrecto',
missing_args = 'No se han ingresado todos los argumentos (x, y, z)',
missing_args2 = '¡Todos los argumentos deben estar presentes!',
missing_args = 'No se han introducido todos los argumentos (x, y, z)',
missing_args2 = 'Debes introducir todos los argumentos',
no_access = 'No tienes acceso a este comando',
company_too_poor = 'Tu empleador está en bancarrota',
company_too_poor = 'Tu empresa está en bancarrota',
item_not_exist = 'El objeto no existe',
too_heavy = 'Inventario muy lleno',
duplicate_license = 'Tu licencia de Rockstar está duplicada',
no_valid_license = 'No tienes licencia de Rockstar válida',
not_whitelisted = 'No estás en la lista blanca de este servidor'
too_heavy = 'No tienes espacio en tu inventario',
duplicate_license = 'Licencia de Rockstar está duplicada',
no_valid_license = 'No tienes una licencia de Rockstar válida',
not_whitelisted = 'No tienes acceso a este servidor'
},
success = {},
info = {
received_paycheck = 'Has recibido tu salario de $%{value}',
received_paycheck = 'Has recibido tu salario de %{value}$',
job_info = 'Trabajo: %{value} | Puesto: %{value2} | Estado: %{value3}',
gang_info = 'Pandilla: %{value} | Puesto: %{value2}',
on_duty = 'Estás en servicio',
on_duty = 'Estás de servicio',
off_duty = 'Estás fuera de servicio',
checking_ban = 'Hola %s. Estamos revisando si has sido baneado.',
join_server = 'Bienvenido %s a {Server Name}.',
checking_whitelisted = 'Hola %s. Estamos revisando si estás en nuestra lista blanca.'
checking_ban = 'Bienvenid@ %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.'
}
}
+15 -9
View File
@@ -2,20 +2,26 @@ local Translations = {
error = {
not_online = 'שחקן לא מחובר',
wrong_format = 'פורמט שגוי',
missing_args = 'יש לכתוב את הפקודה לפי מה שכתוב (x, y, z)',
missing_args2 = 'יש למלא את כל המידע המבוקש',
no_access = 'אין לך גישה לפקודה זו',
company_too_poor = 'העסק שלך שבור',
item_not_exist = 'אייטם לא נמצא',
too_heavy = 'אינבנטורי מלא'
missing_args = '(x, y, z) לא כל פרמטר הוזן',
missing_args2 = '!יש להזין את כל הפרמטרים',
no_access = 'אין גישה לפקודה זו',
company_too_poor = 'המעסיק שלך עני מידי',
item_not_exist = 'פריט לא קיים',
too_heavy = 'אינבנטורי מלא',
duplicate_license = 'Rockstar נמצא שכפול רישיון',
no_valid_license = 'תקף Rockstar לא נמצא רישיון',
not_whitelisted = 'את/ה לא ברשימת המותרים בשרת הזה'
},
success = {},
info = {
received_paycheck = '$%{value} קיבלת משבורת על סך',
received_paycheck = '$%{value} קיבלת תלוש שכר על סך',
job_info = '%{value3} :בתפקיד | %{value2} :דרגה | %{value} :עבודה',
gang_info = '%{value2} :דרגה | %{value} :גאנג',
on_duty = 'אתה בתפקיד כעת',
off_duty = 'ירדת מתפקיד כעת'
on_duty = '!עלית לתפקיד',
off_duty = '!ירדת מהתפקיד',
checking_ban = '.אנחנו בודקים אם את/ה חסום/ה בשרת הזה .%s שלום',
join_server = '.{Server Name}-ל %s ברוך/ה הבא/ה',
checking_whitelisted = '.אנחנו בודקים אם את/ה ברשימת המותרים .%s שלום'
}
}
+13 -7
View File
@@ -2,20 +2,26 @@ local Translations = {
error = {
not_online = 'Игрок не в сети',
wrong_format = 'Неверный формат',
missing_args = 'Введены не все аргументы (x, y, z)',
missing_args = 'Не все аргументы были заполнены (x, y, z)',
missing_args2 = 'Все аргументы должны быть заполнены!',
no_access = 'Нет доступа к этой команде',
company_too_poor = 'Ваш работодатель разорился',
item_not_exist = 'Элемент не существует',
too_heavy = 'Инвентарь слишком полон'
company_too_poor = 'Ваш работодатель без денег',
item_not_exist = 'Вещь не существует',
too_heavy = 'Инвентарь слишком полный',
duplicate_license = 'Найден дубликат лицензии Rockstar',
no_valid_license = 'Не найдена действующая лицензия Rockstar',
not_whitelisted = 'Вы не в белом списке этого сервера'
},
success = {},
info = {
received_paycheck = 'Вы получили зарплату в размере $%{value}',
job_info = 'Задание: %{значение} | Оценка: %{value2} | Обязанность: %{value3}',
gang_info = 'Банда: %{значение} | Оценка: %{value2}',
job_info = 'Задание: %{value} | Оценка: %{value2} | Дежурство: %{value3}',
gang_info = 'Банда: %{value} | Оценка: %{value2}',
on_duty = 'Вы сейчас на дежурстве!',
off_duty = 'Вы сейчас не дежурный!'
off_duty = 'Вы сейчас не дежурный!',
checking_ban = 'Привет %s. Мы проверяем если вы забанены.',
join_server = 'Добро пожаловать %s в {Server Name}.',
checking_whitelisted = 'Привет %s. Мы проверяем если вы в белом списке.'
}
}
+15
View File
@@ -242,6 +242,7 @@ QBCore.Functions.CreateCallback('QBCore:HasItem', function(source, cb, items, am
cb(retval)
end)
-- Use this for player vehicle spawning
-- Vehicle server-side spawning callback (netId)
-- use the netid on the client with the NetworkGetEntityFromNetworkId native
-- convert it to a vehicle via the NetToVeh native
@@ -253,3 +254,17 @@ QBCore.Functions.CreateCallback('QBCore:Server:SpawnVehicle', function(source, c
if warp then TaskWarpPedIntoVehicle(GetPlayerPed(source), veh, -1) end
cb(NetworkGetNetworkIdFromEntity(veh))
end)
-- Use this for long distance vehicle spawning
-- vehicle server-side spawning callback (netId)
-- use the netid on the client with the NetworkGetEntityFromNetworkId native
-- convert it to a vehicle via the NetToVeh native
QBCore.Functions.CreateCallback('QBCore:Server:CreateVehicle', function(source, cb, model, coords, warp)
model = type(model) == 'string' and GetHashKey(model) or model
if not coords then coords = GetEntityCoords(GetPlayerPed(source)) end
local CreateAutomobile = GetHashKey("CREATE_AUTOMOBILE")
local veh = Citizen.InvokeNative(CreateAutomobile, model, coords, coords.w, true, true)
while not DoesEntityExist(veh) do Wait(0) end
if warp then TaskWarpPedIntoVehicle(GetPlayerPed(source), veh, -1) end
cb(NetworkGetNetworkIdFromEntity(veh))
end)
+11 -11
View File
@@ -44,7 +44,7 @@ function QBCore.Functions.GetPlayer(source)
end
function QBCore.Functions.GetPlayerByCitizenId(citizenid)
for src, _ in pairs(QBCore.Players) do
for src in pairs(QBCore.Players) do
if QBCore.Players[src].PlayerData.citizenid == citizenid then
return QBCore.Players[src]
end
@@ -57,7 +57,7 @@ function QBCore.Functions.GetOfflinePlayerByCitizenId(citizenid)
end
function QBCore.Functions.GetPlayerByPhone(number)
for src, _ in pairs(QBCore.Players) do
for src in pairs(QBCore.Players) do
if QBCore.Players[src].PlayerData.charinfo.phone == number then
return QBCore.Players[src]
end
@@ -67,7 +67,7 @@ end
function QBCore.Functions.GetPlayers()
local sources = {}
for k, _ in pairs(QBCore.Players) do
for k in pairs(QBCore.Players) do
sources[#sources+1] = k
end
return sources
@@ -169,26 +169,26 @@ end
-- Server side vehicle creation with optional callback
-- the CreateVehicle RPC still uses the client for creation so players must be near
function QBCore.Functions.SpawnVehicle(model, cb, coords, warp)
model = type(model) == 'string' and GetHashKey(model) or model
function QBCore.Functions.SpawnVehicle(source, model, coords, warp)
model = type(model) == 'string' and joaat(model) or model
if not coords then coords = GetEntityCoords(GetPlayerPed(source)) end
local veh = CreateVehicle(model, coords.x, coords.y, coords.z, coords.w, true, true)
while not DoesEntityExist(veh) do Wait(0) end
if warp then TaskWarpPedIntoVehicle(GetPlayerPed(source), veh, -1) end
if cb then cb(veh) end
return veh
end
-- Server side vehicle creation with optional callback
-- the CreateAutomobile native is still experimental but doesn't use client for creation
-- doesn't work for all vehicles!
function QBCore.Functions.CreateVehicle(model, cb, coords, warp)
model = type(model) == 'string' and GetHashKey(model) or model
function QBCore.Functions.CreateVehicle(source, model, coords, warp)
model = type(model) == 'string' and joaat(model) or model
if not coords then coords = GetEntityCoords(GetPlayerPed(source)) end
local CreateAutomobile = GetHashKey("CREATE_AUTOMOBILE")
local CreateAutomobile = `CREATE_AUTOMOBILE`
local veh = Citizen.InvokeNative(CreateAutomobile, model, coords, coords.w, true, true)
while not DoesEntityExist(veh) do Wait(0) end
if warp then TaskWarpPedIntoVehicle(GetPlayerPed(source), veh, -1) end
if cb then cb(veh) end
return veh
end
-- Paychecks (standalone - don't touch)
@@ -357,7 +357,7 @@ function QBCore.Functions.ToggleOptin(source)
if not license or not QBCore.Functions.HasPermission(source, 'admin') then return end
local Player = QBCore.Functions.GetPlayer(source)
Player.PlayerData.optin = not Player.PlayerData.optin
Player.Functions.SetMetaData('optin', Player.PlayerData.optin)
Player.Functions.SetPlayerData('optin', Player.PlayerData.optin)
end
-- Check if player is banned
+6
View File
@@ -253,6 +253,12 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
self.Functions.UpdatePlayerData()
end
function self.Functions.SetPlayerData(key, val)
if not key then return end
self.PlayerData[key] = val
self.Functions.UpdatePlayerData()
end
function self.Functions.SetMetaData(meta, val)
if not meta then return end
meta = meta:lower()
+162
View File
@@ -4419,6 +4419,168 @@ QBShared.Vehicles = {
['hash'] = `nimbus`,
['shop'] = 'air',
},
['brioso3'] = { --DLC +set sv_enforceGameBuild 2699 (and below)
['name'] = 'Brioso 300 Widebody',
['brand'] = 'Grotti',
['model'] = 'brioso3',
['price'] = 125000,
['category'] = 'compacts',
['hash'] = `brioso3`,
['shop'] = 'pdm',
},
['conada'] = {
['name'] = 'Conada',
['brand'] = 'Buckingham',
['model'] = 'conada',
['price'] = 115000,
['category'] = 'helicopters',
['hash'] = `conada`,
['shop'] = 'air',
},
['corsita'] = {
['name'] = 'Corsita',
['brand'] = 'Lampadati',
['model'] = 'corsita',
['price'] = 90000,
['category'] = 'sports',
['hash'] = `corsita`,
['shop'] = 'luxury',
},
['draugur'] = {
['name'] = 'Draugur',
['brand'] = 'Declasse',
['model'] = 'draugur',
['price'] = 99000,
['category'] = 'offroad',
['hash'] = `draugur`,
['shop'] = 'pdm',
},
['greenwood'] = {
['name'] = 'Greenwood',
['brand'] = 'Bravado',
['model'] = 'greenwood',
['price'] = 105000,
['category'] = 'muscle',
['hash'] = `greenwood`,
['shop'] = 'pdm',
},
['kanjosj'] = {
['name'] = 'Kanjo SJ',
['brand'] = 'Dinka',
['model'] = 'kanjosj',
['price'] = 143000,
['category'] = 'coupes',
['hash'] = `kanjosj`,
['shop'] = 'pdm',
},
['lm87'] = {
['name'] = 'LM87',
['brand'] = 'Benefactor',
['model'] = 'lm87',
['price'] = 155000,
['category'] = 'super',
['hash'] = `lm87`,
['shop'] = 'luxury',
},
['omnisegt'] = {
['name'] = 'Omnis e-GT',
['brand'] = 'Obey',
['model'] = 'omnisegt',
['price'] = 185000,
['category'] = 'sports',
['hash'] = `omnisegt`,
['shop'] = 'luxury',
},
['postlude'] = {
['name'] = 'Postlude',
['brand'] = 'Dinka',
['model'] = 'postlude',
['price'] = 90000,
['category'] = 'coupes',
['hash'] = `postlude`,
['shop'] = 'pdm',
},
['rhinehart'] = {
['name'] = 'Rhinehart',
['brand'] = 'Ubermacht',
['model'] = 'rhinehart ',
['price'] = 105000,
['category'] = 'sedans',
['hash'] = `rhinehart`,
['shop'] = 'pdm',
},
['ruiner4'] = {
['name'] = 'Ruiner ZZ-8',
['brand'] = 'Imponte',
['model'] = 'ruiner4',
['price'] = 85000,
['category'] = 'muscle',
['hash'] = `ruiner4`,
['shop'] = 'pdm',
},
['sentinel4'] = {
['name'] = 'Sentinel Classic Widebody',
['brand'] = 'Ubermacht',
['model'] = 'sentinel4',
['price'] = 140000,
['category'] = 'sports',
['hash'] = `sentinel4`,
['shop'] = 'luxury',
},
['sm722'] = {
['name'] = 'SM722',
['brand'] = 'Benefacto',
['model'] = 'sm722',
['price'] = 125000,
['category'] = 'sports',
['hash'] = `sm722`,
['shop'] = 'luxury',
},
['tenf'] = {
['name'] = '10F',
['brand'] = 'Obey',
['model'] = 'tenf',
['price'] = 185000,
['category'] = 'sports',
['hash'] = `tenf`,
['shop'] = 'luxury',
},
['tenf2'] = {
['name'] = '10F Widebody',
['brand'] = 'Obey',
['model'] = 'tenf2',
['price'] = 215000,
['category'] = 'sports',
['hash'] = `tenf2`,
['shop'] = 'luxury',
},
['torero2'] = {
['name'] = 'Torero XO',
['brand'] = 'Pegassi',
['model'] = 'torero2',
['price'] = 245000,
['category'] = 'super',
['hash'] = `torero2`,
['shop'] = 'luxury',
},
['vigero2'] = {
['name'] = 'Vigero ZX',
['brand'] = 'Declasse',
['model'] = 'vigero2',
['price'] = 105000,
['category'] = 'muscle',
['hash'] = `vigero2`,
['shop'] = 'pdm',
},
['weevil2'] = {
['name'] = 'Weevil Custom',
['brand'] = 'BF',
['model'] = 'weevil2',
['price'] = 95000,
['category'] = 'muscle',
['hash'] = `weevil2`,
['shop'] = 'pdm',
},
}
for _, v in pairs(QBShared.Vehicles) do