Merge branch 'main' into patch-1

This commit is contained in:
Kakarot
2023-04-27 16:19:05 -07:00
committed by GitHub
16 changed files with 1039 additions and 482 deletions
+1 -1
View File
@@ -197,5 +197,5 @@ All lua code should be done using all the best practices of proper lua using the
### JavaScript Styleguide ### JavaScript Styleguide
- Use 2 Space indentation - Use 4 Space indentation
- Don't repeat yourself.. if you're using the same operations in many different places convert them into a function with flexible variables. - Don't repeat yourself.. if you're using the same operations in many different places convert them into a function with flexible variables.
+1
View File
@@ -129,6 +129,7 @@ RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
end end
if IsPedInAnyVehicle(ped) then if IsPedInAnyVehicle(ped) then
SetEntityAsMissionEntity(veh, true, true)
DeleteVehicle(veh) DeleteVehicle(veh)
end end
+9 -5
View File
@@ -21,13 +21,8 @@ end
function QBCore.Functions.DrawText(x, y, width, height, scale, r, g, b, a, text) function QBCore.Functions.DrawText(x, y, width, height, scale, r, g, b, a, text)
-- Use local function instead -- Use local function instead
SetTextFont(4) SetTextFont(4)
SetTextProportional(0)
SetTextScale(scale, scale) SetTextScale(scale, scale)
SetTextColour(r, g, b, a) SetTextColour(r, g, b, a)
SetTextDropShadow(0, 0, 0, 0, 255)
SetTextEdge(2, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry('STRING') SetTextEntry('STRING')
AddTextComponentString(text) AddTextComponentString(text)
DrawText(x - width / 2, y - height / 2 + 0.005) DrawText(x - width / 2, y - height / 2 + 0.005)
@@ -605,6 +600,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
end end
if props.color1 then if props.color1 then
if type(props.color1) == "number" then if type(props.color1) == "number" then
ClearVehicleCustomPrimaryColour(vehicle)
SetVehicleColours(vehicle, props.color1, colorSecondary) SetVehicleColours(vehicle, props.color1, colorSecondary)
else else
SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3]) SetVehicleCustomPrimaryColour(vehicle, props.color1[1], props.color1[2], props.color1[3])
@@ -612,6 +608,7 @@ function QBCore.Functions.SetVehicleProperties(vehicle, props)
end end
if props.color2 then if props.color2 then
if type(props.color2) == "number" then if type(props.color2) == "number" then
ClearVehicleCustomSecondaryColour(vehicle)
SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2) SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2)
else else
SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3]) SetVehicleCustomSecondaryColour(vehicle, props.color2[1], props.color2[2], props.color2[3])
@@ -992,3 +989,10 @@ function QBCore.Functions.GetGroundZCoord(coords)
return coords return coords
end end
end end
function QBCore.Functions.GetGroundHash(entity)
local coords = GetEntityCoords(entity)
local num = StartShapeTestCapsule(coords.x, coords.y, coords.z + 4, coords.x, coords.y, coords.z - 2.0, 1, 1, entity, 7)
local retval, success, endCoords, surfaceNormal, materialHash, entityHit = GetShapeTestResultEx(num)
return materialHash, entityHit, surfaceNormal, endCoords, success, retval
end
+1 -1
View File
@@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5' game 'gta5'
description 'QB-Core' description 'QB-Core'
version '1.2.1' version '1.2.6'
shared_scripts { shared_scripts {
'config.lua', 'config.lua',
+105 -10
View File
@@ -8,21 +8,116 @@ local Translations = {
company_too_poor = '你所在的公司账户目前发不起工资', company_too_poor = '你所在的公司账户目前发不起工资',
item_not_exist = '该物品不存在', item_not_exist = '该物品不存在',
too_heavy = '背包已满', too_heavy = '背包已满',
location_not_exist = '位置不存在',
duplicate_license = '发现重复的 Rockstar 许可证', duplicate_license = '发现重复的 Rockstar 许可证',
no_valid_license = '未找到有效的 Rockstar 许可证', no_valid_license = '未找到有效的 Rockstar 许可证',
not_whitelisted = '您没有被列入此服务器的白名单' not_whitelisted = '您没有被列入此服务器的白名单',
server_already_open = '服务器已打开',
server_already_closed = '服务器已关闭',
no_permission = '您没有此权限..',
no_waypoint = '无GPS点位设置.',
tp_error = '传送时出错.',
connecting_database_error = '连接到服务器时发生数据库错误。(SQL server是否已打开?)',
connecting_database_timeout = '与数据库的连接超时。(SQL server是否已打开?)',
},
success = {
server_opened = '服务器已打开',
server_closed = '服务器已关闭',
teleported_waypoint = '传送至航路点.',
}, },
success = {},
info = { info = {
received_paycheck = '你收到了你的工资 $%{value}', received_paycheck = '你收到的薪水是 $%{value}',
job_info = '工作: %{value} | 级别: %{value2} | 工作状态状态: %{value3}', job_info = '工作: %{value} | 级别: %{value2} | 上班状态: %{value3}',
gang_info = '帮派: %{value} | 级别: %{value2}', gang_info = '帮派: %{value} | 级别: %{value2}',
on_duty = '你开始上班了!', on_duty = '现在开始上班了!',
off_duty = '现在下班了!', off_duty = '现在开始你下班了!',
checking_ban = '你好 %s. 我们正在检查是否被服务器封禁.', checking_ban = '你好 %s. 我们正在检查是否被禁.',
join_server = '欢迎 %s 入 {Server Name}.', join_server = '欢迎 %s 入 {Server Name}.',
checking_whitelisted = '你好 %s. 我们正在检查您是否在白名单内.' checking_whitelisted = '你好 %s. 我们正在检查您是否在白名单内.',
} exploit_banned = '你因作弊而被禁止。查看Discord了解更多信息:%{discord}',
exploit_dropped = '你因为被而被踢出',
},
command = {
tp = {
help = 'TP至玩家或坐标(仅限管理员)',
params = {
x = { name = 'id/x', help = '玩家ID或X位置'},
y = { name = 'y', help = 'Y位置'},
z = { name = 'z', help = 'Z位置'},
},
},
tpm = { help = 'TP到标记(仅限管理员)' },
togglepvp = { help = '切换服务器上的PVP(仅限管理员)' },
addpermission = {
help = '授予玩家权限(仅限God)',
params = {
id = { name = 'id', help = '玩家ID' },
permission = { name = 'permission', help = '权限级别' },
},
},
removepermission = {
help = '删除玩家权限(仅限上帝)',
params = {
id = { name = 'id', help = '玩家ID' },
permission = { name = 'permission', help = '权限级别' },
},
},
openserver = { help = '为每个人打开服务器(仅限管理员)' },
closeserver = {
help = '为没有权限的人关闭服务器(仅限管理员)',
params = {
reason = { name = 'reason', help = '关闭原因(可选)' },
},
},
car = {
help = '刷出车辆(仅限管理员)',
params = {
model = { name = 'model', help = '车辆型号名称' },
},
},
dv = { help = '删除车辆(仅限管理员)' },
givemoney = {
help = '给玩家钱(仅限管理员)',
params = {
id = { name = 'id', help = '玩家ID' },
moneytype = { name = 'moneytype', help = '货币类型(cash, bank, crypto)' },
amount = { name = 'amount', help = '数量' },
},
},
setmoney = {
help = '设置玩家金额(仅限管理员)',
params = {
id = { name = 'id', help = '玩家ID' },
moneytype = { name = 'moneytype', help = '货币类型(cash, bank, crypto)' },
amount = { name = 'amount', help = '数量' },
},
},
job = { help = '检查您的工作' },
setjob = {
help = '设置玩家工作(仅限管理员)',
params = {
id = { name = 'id', help = '玩家ID' },
job = { name = 'job', help = '工作名称' },
grade = { name = 'grade', help = '工作级别' },
},
},
gang = { help = '检查你的帮派' },
setgang = {
help = '设置玩家作业(仅限管理员)',
params = {
id = { name = 'id', help = '玩家ID' },
gang = { name = 'gang', help = '帮派名称' },
grade = { name = 'grade', help = '帮派级别' },
},
},
ooc = { help = 'OOC聊天消息' },
me = {
help = '显示本地消息',
params = {
message = { name = 'message', help = '要发送的消息' }
},
},
},
} }
if GetConvar('qb_locale', 'en') == 'cn' then if GetConvar('qb_locale', 'en') == 'cn' then
+114 -16
View File
@@ -1,28 +1,126 @@
local Translations = { local Translations = {
error = { error = {
not_online = 'Pelaaja ei ole paikalla', not_online = 'Pelaaja ei ole paikalla',
wrong_format = 'Virheellinen muoto', wrong_format = 'Väärä formaatti',
missing_args = 'Kaikkia argumentteja ei ole syötetty (x, y, z)', missing_args = 'Kaikkia argumentteja ei ole syötetty (x, y, z)',
missing_args2 = 'Kaikkia argumentteja ei ole syötetty!', missing_args2 = 'Kaikki argumentit on täytettävä!',
no_access = 'Sinulla ei ole oikeuksia kyseiseen komentoon', no_access = 'Ei pääsyä tähän komentoon',
company_too_poor = 'Sinun firmasi on liian köyhä', company_too_poor = 'Työnantajasi on köyhä',
item_not_exist = 'Tätä itemiä ei ole olemassa', item_not_exist = 'Kohdetta ei ole olemassa',
too_heavy = 'Reppusi on liian täynnä' too_heavy = 'Taskusi ovat täynnä',
location_not_exist = 'Sijaintia ei ole olemassa',
duplicate_license = 'Rockstar-lisenssin kaksoiskappale löydetty',
no_valid_license = 'Voimassa olevaa Rockstar-lisenssiä ei löytynyt',
not_whitelisted = 'Sinua ei ole lisätty tämän palvelimen allowlistille',
server_already_open = 'Serveri on jo auki',
server_already_closed = 'Serveri on jo suljettu',
no_permission = 'Sinulla ei ole oikeuksia tämmöseen..',
no_waypoint = 'Et ole asettanut waypointtia.',
tp_error = 'Virhe teleportatessa.',
connecting_database_error = 'Tietokantavirhe muodostettaessa yhteyttä palvelimeen. (Onko SQL-palvelin päällä?)',
connecting_database_timeout = 'Yhteys tietokantaan aikakatkaistiin. (Onko SQL-palvelin päällä?)',
},
success = {
server_opened = 'Palvelin on avattu',
server_closed = 'Palvelin on suljettu',
teleported_waypoint = 'Teleporttaa Waypointille',
}, },
success = {},
info = { info = {
received_paycheck = 'Sinä sait palkan $%{value}', received_paycheck = 'Olet saanut palkkasi $%{value}',
job_info = 'Työ: %{value} | Arvo: %{value2} | Vuorossa: %{value3}', job_info = 'Työ: %{value} | Arvo: %{value2} | Vuorossa: %{value3}',
gang_info = 'Jengi: %{value} | Arvo: %{value2}', gang_info = 'Jengi: %{value} | Arvo: %{value2}',
on_duty = 'Sinä olet nyt vuorossa!', on_duty = 'Olet nyt vuorossa',
off_duty = 'Sinä poistuit vuorosta!' off_duty = 'Olet nyt poisvuorosta!',
} checking_ban = 'Tervehdys %s. Tarkistetaan oletko saanut porttikieltoa.',
join_server = 'Tervetuloa %s - {Server Name}.',
checking_whitelisted = 'Terve %s. Tarkistamme etusi.',
exploit_banned = 'Sinut on bännatty cheattaamisesta. Katso lisätietoja Discordistamme: %{discord}',
exploit_dropped = 'Sinua on potkittu hyväksikäytön vuoksi',
},
command = {
tp = {
help = 'TP pelaajalle tai koordinaateille (Vain Admineille)',
params = {
x = { name = 'id/x', help = 'Pelaajan ID tai X-paikka'},
y = { name = 'y', help = 'Y position'},
z = { name = 'z', help = 'Z position'},
},
},
tpm = { help = 'TP Markerille (Vain Admineille)' },
togglepvp = { help = 'Vaihda PVP palvelimelle (Vain Admineille)' },
addpermission = {
help = 'Anna pelaajalle admin oikeudet (God Only)',
params = {
id = { name = 'id', help = 'Pelaajan ID' },
permission = { name = 'permission', help = 'Permission level' },
},
},
removepermission = {
help = 'Poista pelaajatlta admin oikeudet (God Only)',
params = {
id = { name = 'id', help = 'Pelaajan ID' },
permission = { name = 'permission', help = 'Permission level' },
},
},
openserver = { help = 'Avaa palvelin kaikille (Vain Admineille)' },
closeserver = {
help = 'Sulje palvelin ihmisiltä, joilla ei ole oikeuksia (Vain Admineille)',
params = {
reason = { name = 'reason', help = 'Sulkemisen syy (valinnainen)' },
},
},
car = {
help = 'Spawnaa ajoneuvo (Vain Admineille)',
params = {
model = { name = 'model', help = 'Ajoneuvon nimi' },
},
},
dv = { help = 'Poista ajoneuvo (Vain Admineille)' },
givemoney = {
help = 'Anna Pelaajalle rahaa (Vain Admineille)',
params = {
id = { name = 'id', help = 'Pelaajan ID' },
moneytype = { name = 'moneytype', help = 'Rahan tyyppi (cash, bank, crypto)' },
amount = { name = 'amount', help = 'Rahan määrä' },
},
},
setmoney = {
help = 'Aseta pelaajien rahasumma (Vain Admineille)',
params = {
id = { name = 'id', help = 'Pelaajan ID' },
moneytype = { name = 'moneytype', help = 'Rahan tyyppi (cash, bank, crypto)' },
amount = { name = 'amount', help = 'Rahan määrä' },
},
},
job = { help = 'katso työsi' },
setjob = {
help = 'Aseta pelaajalle työ (Vain Admineille)',
params = {
id = { name = 'id', help = 'Pelaajan ID' },
job = { name = 'job', help = 'Työn nimi' },
grade = { name = 'grade', help = 'Arvo' },
},
},
gang = { help = 'Katso jengisi' },
setgang = {
help = 'Aseta pelaajalle jengi (Vain Admineille)',
params = {
id = { name = 'id', help = 'Pelaajan ID' },
gang = { name = 'gang', help = 'Jengin Nimi' },
grade = { name = 'grade', help = 'Arvo' },
},
},
ooc = { help = 'OOC Viesti lähipelaajille' },
me = {
help = 'Näytä paikallinen viesti',
params = {
message = { name = 'message', help = 'Mitä haluat kertoa?' }
},
},
},
} }
if GetConvar('qb_locale', 'en') == 'fi' then Lang = Lang or Locale:new({
Lang = Locale:new({
phrases = Translations, phrases = Translations,
warnOnMissing = true, warnOnMissing = true
fallbackLang = Lang,
}) })
end
+108 -12
View File
@@ -1,28 +1,123 @@
local Translations = { local Translations = {
error = { error = {
not_online = 'Speler is niet online', not_online = 'Speler niet online',
wrong_format = 'Onjuiste opmaak', wrong_format = 'Onjuiste opmaak',
missing_args = 'Niet elk argument is ingevuld (x, y, z)', missing_args = 'Niet elk argument is ingevuld (x, y, z)',
missing_args2 = 'Alle argumenten moeten worden ingevuld!', missing_args2 = 'Alle argumenten moeten worden ingevuld!',
no_access = 'Geen toegang tot dit commando', no_access = 'Geen toegang tot dit commando',
company_too_poor = 'Je werkgever is arm', company_too_poor = 'Je werkgever is arm',
item_not_exist = 'Item bestaat niet', item_not_exist = 'Item bestaat niet',
too_heavy = 'Inventaris is te vol', too_heavy = 'Broekzakken zitten vol',
location_not_exist = 'Locatie bestaat niet',
duplicate_license = 'Dubbele Rockstar-licentie gevonden', duplicate_license = 'Dubbele Rockstar-licentie gevonden',
no_valid_license = 'Geen geldige Rockstar-licentie gevonden', no_valid_license = 'Geen geldige Rockstar-licentie gevonden',
not_whitelisted = 'Je staat niet op de whitelist voor deze server' not_whitelisted = 'U bent niet whitelisted voor deze server',
server_already_open = 'De server is al open',
server_already_closed = 'De server is al gesloten',
no_permission = 'Je hebt geen permissie voor dit..',
no_waypoint = 'Geen bestemming geselecteerd',
tp_error = 'Er is een foutje begaan tijdens het teleporteren',
connecting_database_error = 'Er is een databasefout opgetreden tijdens het maken van een verbinding met de server. (Is de SQL-server ingeschakeld?)',
connecting_database_timeout = 'Er is een time-out opgetreden voor verbinding met database. (Is de SQL-server ingeschakeld?)',
},
success = {
server_opened = 'De server is geopend',
server_closed = 'De server is gesloten',
teleported_waypoint = 'Geteleporteerd naar bestemming',
}, },
success = {},
info = { info = {
received_paycheck = 'Je hebt je salaris van $%{value} ontvangen', received_paycheck = 'Je hebt je salaris ontvangen van $%{value}',
job_info = 'Baan: %{value} | Rang: %{value2} | In dienst: %{value3}', job_info = 'Job: %{value} | Graad: %{value2} | Dienst: %{value3}',
gang_info = 'Gang: %{value} | Rang: %{value2}', gang_info = 'Gang: %{value} | Graad: %{value2}',
on_duty = 'Je bent nu in dienst!', on_duty = 'U bent nu in dienst!',
off_duty = 'Je bent nu uit dienst!', off_duty = 'U bent nu uit dienst!',
checking_ban = 'Hallo %s. We controleren of je verbannen bent.', checking_ban = 'Hallo %s. We checken even of je op onze banlist staat.',
join_server = 'Welkom %s bij {Server Name}.', join_server = 'Welkom %s bij {Server Name}.',
checking_whitelisted = 'Hallo %s. We controleren of je op de whitelist staat.' checking_whitelisted = 'Hallo %s. We checken even of je toegang hebt.',
} exploit_banned = 'Je bent verbannen wegens cheating. Bekijk onze Discord voor meer informatie: %{discord}',
exploit_dropped = 'Je bent gekicked voor exploitation',
},
command = {
tp = {
help = 'Teleport naar speler of coördinaten (Alleen Admin)',
params = {
x = { name = 'id/x', help = 'ID van speler of X-positie'},
y = { name = 'y', help = 'Y positie'},
z = { name = 'z', help = 'Z positie'},
},
},
tpm = { help = 'Teleport naar bestemming (Alleen Admin)' },
togglepvp = { help = 'PVP op de server in-/uitschakelen (Alleen Admin)' },
addpermission = {
help = 'Spelersmachtigingen toevoegen (alleen God)',
params = {
id = { name = 'id', help = 'ID van de speler' },
permission = { name = 'permission', help = 'Machtigingsniveau' },
},
},
removepermission = {
help = 'Spelersmachtigingen verwijderen (alleen God)',
params = {
id = { name = 'id', help = 'ID van de speler' },
permission = { name = 'permission', help = 'Machtigingsniveau' },
},
},
openserver = { help = 'Open de server voor iedereen (Alleen Admin)' },
closeserver = {
help = 'Sluit de server voor personen zonder machtigingen (Alleen Admin)',
params = {
reason = { name = 'reason', help = 'Reden voor sluiting (optioneel)' },
},
},
car = {
help = 'Spawn Voertuig (Alleen Admin)',
params = {
model = { name = 'model', help = 'Modelnaam van het voertuig' },
},
},
dv = { help = 'Verwijder Voertuig (Alleen Admin)' },
givemoney = {
help = 'Geef een speler geld (Alleen Admin)',
params = {
id = { name = 'id', help = 'Speler ID' },
moneytype = { name = 'moneytype', help = 'Type geld (cash, bank, crypto)' },
amount = { name = 'amount', help = 'Hoeveelheid geld' },
},
},
setmoney = {
help = 'Stel spelers geldbedrag in (Alleen Admin)',
params = {
id = { name = 'id', help = 'Speler ID' },
moneytype = { name = 'moneytype', help = 'Type geld (cash, bank, crypto)' },
amount = { name = 'amount', help = 'Hoeveelheid geld' },
},
},
job = { help = 'Controleer uw job' },
setjob = {
help = 'Een speler zijn job instellen (Alleen Admin)',
params = {
id = { name = 'id', help = 'Speler ID' },
job = { name = 'job', help = 'Job naam' },
grade = { name = 'grade', help = 'Job graad' },
},
},
gang = { help = 'Controleer uw bende' },
setgang = {
help = 'Een speler zijn bende instellen (Alleen Admin)',
params = {
id = { name = 'id', help = 'Speler ID' },
gang = { name = 'gang', help = 'Bendenaam' },
grade = { name = 'grade', help = 'Bende rol' },
},
},
ooc = { help = 'OOC Chat Bericht' },
me = {
help = 'Lokaal bericht weergeven',
params = {
message = { name = 'message', help = 'Bericht dat je wil versturen' }
},
},
},
} }
if GetConvar('qb_locale', 'en') == 'nl' then if GetConvar('qb_locale', 'en') == 'nl' then
@@ -32,3 +127,4 @@ if GetConvar('qb_locale', 'en') == 'nl' then
fallbackLang = Lang, fallbackLang = Lang,
}) })
end end
+17 -17
View File
@@ -4,7 +4,7 @@ local Translations = {
wrong_format = 'Ugyldig format', wrong_format = 'Ugyldig format',
missing_args = 'Ikke alle argumenter er lagt inn (x, y, z)', missing_args = 'Ikke alle argumenter er lagt inn (x, y, z)',
missing_args2 = 'Alle argumenter må fylles ut!', missing_args2 = 'Alle argumenter må fylles ut!',
no_access = 'Ingen tilgang til denne kommandoen', no_access = 'Du mangler tilgang til denne kommandoen',
company_too_poor = 'Arbeidsgiveren din er blakk', company_too_poor = 'Arbeidsgiveren din er blakk',
item_not_exist = 'Gjenstand finnes ikke', item_not_exist = 'Gjenstand finnes ikke',
too_heavy = 'Lommene er fulle', too_heavy = 'Lommene er fulle',
@@ -14,24 +14,24 @@ local Translations = {
not_whitelisted = 'Du har ikke tilgang til serveren', not_whitelisted = 'Du har ikke tilgang til serveren',
server_already_open = 'Serveren er allerede åpen', server_already_open = 'Serveren er allerede åpen',
server_already_closed = 'Serveren er allerede stengt', server_already_closed = 'Serveren er allerede stengt',
no_permission = 'Du har ikke tillatelser for dette..', no_permission = 'Du har ikke tillatelser til dette..',
no_waypoint = 'Ingen veipunkt satt.', no_waypoint = 'Ingen markør satt.',
tp_error = 'Feil under teleportering.', tp_error = 'Feil under teleportering.',
}, },
success = { success = {
server_opened = 'Serveren er åpnet', server_opened = 'Serveren er åpnet',
server_closed = 'Serveren er stengt', server_closed = 'Serveren er stengt',
teleported_waypoint = 'Teleporter til veipunkt.', teleported_waypoint = 'Teleporter til angitt markør.',
}, },
info = { info = {
received_paycheck = 'Du mottok lønnsslippen din på kr %{value}', received_paycheck = 'Du har mottatt lønnsslippen din på kr %{value}',
job_info = 'Jobb: %{value} | Grad: %{value2} | vakt: %{value3}', job_info = 'Jobb: %{value} | Grad: %{value2} | Vakt: %{value3}',
gang_info = 'Gjeng: %{value} | Grad: %{value2}', gang_info = 'Gjeng: %{value} | Grad: %{value2}',
on_duty = 'Du er nå på vakt!', on_duty = 'Du er nå på vakt!',
off_duty = 'Du er nå av vakt!', off_duty = 'Du er nå av vakt!',
checking_ban = 'Hei %s. Vi sjekker om du er utestengt.', checking_ban = 'Hei %s. Vi sjekker om du er utestengt.',
join_server = 'Velkommen %s til {Server Name}.', join_server = 'Velkommen %s til {Server Name}.',
checking_whitelisted = 'Hei %s. Vi sjekker tilganger.', checking_whitelisted = 'Hei %s. Vi sjekker dine tilganger.',
exploit_banned = 'Du har blitt utestengt for juks. Sjekk vår Discord for mer informasjon: %{discord}', exploit_banned = 'Du har blitt utestengt for juks. Sjekk vår Discord for mer informasjon: %{discord}',
exploit_dropped = 'Du har blitt sparket for utnyttelse', exploit_dropped = 'Du har blitt sparket for utnyttelse',
}, },
@@ -44,23 +44,23 @@ local Translations = {
z = { name = 'z', help = 'Z posisjon'}, z = { name = 'z', help = 'Z posisjon'},
}, },
}, },
tpm = { help = 'TP Til Marker (kun admin)' }, tpm = { help = 'TP Til Markør (kun admin)' },
togglepvp = { help = 'S PVP på serveren (kun admin)' }, togglepvp = { help = 'Skru på/av PVP på serveren (kun admin)' },
addpermission = { addpermission = {
help = 'Gi spillertillatelser (Kun gud)', help = 'Gi spillertilganger (Kun gud)',
params = { params = {
id = { name = 'id', help = 'ID på spiller' }, id = { name = 'id', help = 'ID på spiller' },
permission = { name = 'permission', help = 'Tillatelsesnivå '}, permission = { name = 'permission', help = 'Tilgangsnivå '},
}, },
}, },
removepermission = { removepermission = {
help = 'Fjern spillertillatelser (kun gud)', help = 'Fjern spillertilganger (kun gud)',
params = { params = {
id = { name = 'id', help = 'ID på spiller' }, id = { name = 'id', help = 'ID på spiller' },
permission = { name = 'permission', help = 'Tillatelsesnivå' }, permission = { name = 'permission', help = 'Tilgangsnivå' },
}, },
}, },
openserver = { help = 'Åpne serveren for alle (kun admin)' }, openserver = { help = 'Åpne opp serveren for alle (kun admin)' },
closeserver = { closeserver = {
help = 'Lukk serveren for personer uten tillatelser (kun admin)', help = 'Lukk serveren for personer uten tillatelser (kun admin)',
params = { params = {
@@ -68,7 +68,7 @@ local Translations = {
}, },
}, },
car = { car = {
help = 'Spawn Vehicle (kun admin)', help = 'Spawn kjøretøy (kun admin)',
params = { params = {
model = { name = 'model', help = 'Modellnavn på kjøretøyet' }, model = { name = 'model', help = 'Modellnavn på kjøretøyet' },
}, },
@@ -78,7 +78,7 @@ local Translations = {
help = 'Gi en spiller penger (kun admin)', help = 'Gi en spiller penger (kun admin)',
params = { params = {
id = { name = 'id', help = 'ID på spiller' }, id = { name = 'id', help = 'ID på spiller' },
moneytype = { name = 'moneytype', help = 'Penge type (cash, bank, crypto)' }, moneytype = { name = 'moneytype', help = 'Type: (cash, bank, crypto)' },
amount = { name = 'amount', help = 'Pengebeløp' }, amount = { name = 'amount', help = 'Pengebeløp' },
}, },
}, },
@@ -86,7 +86,7 @@ local Translations = {
help = 'Angi spillerens pengebeløp (kun admin)', help = 'Angi spillerens pengebeløp (kun admin)',
params = { params = {
id = { name = 'id', help = 'ID på spiller' }, id = { name = 'id', help = 'ID på spiller' },
moneytype = { name = 'moneytype', help = 'Penge type (cash, bank, crypto)' }, moneytype = { name = 'moneytype', help = 'Type: (cash, bank, crypto)' },
amount = { name = 'amount', help = 'Pengebeløp' }, amount = { name = 'amount', help = 'Pengebeløp' },
}, },
}, },
+2 -2
View File
@@ -2,7 +2,7 @@ local Translations = {
error = { error = {
not_online = 'Người chơi không trực tuyến', not_online = 'Người chơi không trực tuyến',
wrong_format = 'Định dạng không chính xác', wrong_format = 'Định dạng không chính xác',
missing_args = 'chưa nhập đủ các số (x, y, z)', missing_args = 'Chưa nhập đủ các số (x, y, z)',
missing_args2 = 'Tất cả các đối số phải được điền vào!', missing_args2 = 'Tất cả các đối số phải được điền vào!',
no_access = 'không có quyền sử dụng lệnh này', no_access = 'không có quyền sử dụng lệnh này',
company_too_poor = 'Công ty của bạn đã phá sản', company_too_poor = 'Công ty của bạn đã phá sản',
@@ -11,7 +11,7 @@ local Translations = {
}, },
success = {}, success = {},
info = { info = {
received_paycheck = 'bạn nhận được sốt tiền thanh toán là $%{value}', received_paycheck = 'Bạn nhận được số tiền thanh toán là $%{value}',
job_info = 'Công việc: %{value} | Cấp độ: %{value2} | Làm việc: %{value3}', job_info = 'Công việc: %{value} | Cấp độ: %{value2} | Làm việc: %{value3}',
gang_info = 'Băng đảng: %{value} | Cấp độ: %{value2}', gang_info = 'Băng đảng: %{value} | Cấp độ: %{value2}',
on_duty = 'Bạn đã sẵn sàng làm viêc!', on_duty = 'Bạn đã sẵn sàng làm viêc!',
+142 -34
View File
@@ -8,12 +8,19 @@ QBCore.UsableItems = {}
-- ex: local player = QBCore.Functions.GetPlayer(source) -- ex: local player = QBCore.Functions.GetPlayer(source)
-- ex: local example = player.Functions.functionname(parameter) -- ex: local example = player.Functions.functionname(parameter)
---Gets the coordinates of an entity
---@param entity number
---@return vector4
function QBCore.Functions.GetCoords(entity) function QBCore.Functions.GetCoords(entity)
local coords = GetEntityCoords(entity, false) local coords = GetEntityCoords(entity, false)
local heading = GetEntityHeading(entity) local heading = GetEntityHeading(entity)
return vector4(coords.x, coords.y, coords.z, heading) return vector4(coords.x, coords.y, coords.z, heading)
end end
---Gets player identifier of the given type
---@param source any
---@param idtype string
---@return string?
function QBCore.Functions.GetIdentifier(source, idtype) function QBCore.Functions.GetIdentifier(source, idtype)
local identifiers = GetPlayerIdentifiers(source) local identifiers = GetPlayerIdentifiers(source)
for _, identifier in pairs(identifiers) do for _, identifier in pairs(identifiers) do
@@ -24,6 +31,9 @@ function QBCore.Functions.GetIdentifier(source, idtype)
return nil return nil
end end
---Gets a players server id (source). Returns 0 if no player is found.
---@param identifier string
---@return number
function QBCore.Functions.GetSource(identifier) function QBCore.Functions.GetSource(identifier)
for src, _ in pairs(QBCore.Players) do for src, _ in pairs(QBCore.Players) do
local idens = GetPlayerIdentifiers(src) local idens = GetPlayerIdentifiers(src)
@@ -36,6 +46,9 @@ function QBCore.Functions.GetSource(identifier)
return 0 return 0
end end
---Get player with given server id (source)
---@param source any
---@return table
function QBCore.Functions.GetPlayer(source) function QBCore.Functions.GetPlayer(source)
if type(source) == 'number' then if type(source) == 'number' then
return QBCore.Players[source] return QBCore.Players[source]
@@ -44,6 +57,9 @@ function QBCore.Functions.GetPlayer(source)
end end
end end
---Get player by citizen id
---@param citizenid string
---@return table?
function QBCore.Functions.GetPlayerByCitizenId(citizenid) 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 if QBCore.Players[src].PlayerData.citizenid == citizenid then
@@ -53,10 +69,16 @@ function QBCore.Functions.GetPlayerByCitizenId(citizenid)
return nil return nil
end end
---Get offline player by citizen id
---@param citizenid string
---@return table?
function QBCore.Functions.GetOfflinePlayerByCitizenId(citizenid) function QBCore.Functions.GetOfflinePlayerByCitizenId(citizenid)
return QBCore.Player.GetOfflinePlayer(citizenid) return QBCore.Player.GetOfflinePlayer(citizenid)
end end
---Get player by phone number
---@param number number
---@return table?
function QBCore.Functions.GetPlayerByPhone(number) 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 if QBCore.Players[src].PlayerData.charinfo.phone == number then
@@ -66,6 +88,8 @@ function QBCore.Functions.GetPlayerByPhone(number)
return nil return nil
end end
---Get all players. Returns the server ids of all players.
---@return table
function QBCore.Functions.GetPlayers() function QBCore.Functions.GetPlayers()
local sources = {} local sources = {}
for k in pairs(QBCore.Players) do for k in pairs(QBCore.Players) do
@@ -74,13 +98,16 @@ function QBCore.Functions.GetPlayers()
return sources return sources
end end
-- Will return an array of QB Player class instances ---Will return an array of QB Player class instances
-- unlike the GetPlayers() wrapper which only returns IDs ---unlike the GetPlayers() wrapper which only returns IDs
---@return table
function QBCore.Functions.GetQBPlayers() function QBCore.Functions.GetQBPlayers()
return QBCore.Players return QBCore.Players
end end
---Gets a list of all on duty players of a specified job and the number ---Gets a list of all on duty players of a specified job and the number
---@param job string
---@return table, number
function QBCore.Functions.GetPlayersOnDuty(job) function QBCore.Functions.GetPlayersOnDuty(job)
local players = {} local players = {}
local count = 0 local count = 0
@@ -95,7 +122,9 @@ function QBCore.Functions.GetPlayersOnDuty(job)
return players, count return players, count
end end
-- Returns only the amount of players on duty for the specified job ---Returns only the amount of players on duty for the specified job
---@param job any
---@return number
function QBCore.Functions.GetDutyCount(job) function QBCore.Functions.GetDutyCount(job)
local count = 0 local count = 0
for _, Player in pairs(QBCore.Players) do for _, Player in pairs(QBCore.Players) do
@@ -110,13 +139,17 @@ end
-- Routing buckets (Only touch if you know what you are doing) -- Routing buckets (Only touch if you know what you are doing)
-- Returns the objects related to buckets, first returned value is the player buckets, second one is entity buckets ---Returns the objects related to buckets, first returned value is the player buckets, second one is entity buckets
---@return table, table
function QBCore.Functions.GetBucketObjects() function QBCore.Functions.GetBucketObjects()
return QBCore.Player_Buckets, QBCore.Entity_Buckets return QBCore.Player_Buckets, QBCore.Entity_Buckets
end end
-- Will set the provided player id / source into the provided bucket id ---Will set the provided player id / source into the provided bucket id
function QBCore.Functions.SetPlayerBucket(source --[[ int ]], bucket --[[ int ]]) ---@param source any
---@param bucket any
---@return boolean
function QBCore.Functions.SetPlayerBucket(source, bucket)
if source and bucket then if source and bucket then
local plicense = QBCore.Functions.GetIdentifier(source, 'license') local plicense = QBCore.Functions.GetIdentifier(source, 'license')
SetPlayerRoutingBucket(source, bucket) SetPlayerRoutingBucket(source, bucket)
@@ -127,8 +160,11 @@ function QBCore.Functions.SetPlayerBucket(source --[[ int ]], bucket --[[ int ]]
end end
end end
-- Will set any entity into the provided bucket, for example peds / vehicles / props / etc. ---Will set any entity into the provided bucket, for example peds / vehicles / props / etc.
function QBCore.Functions.SetEntityBucket(entity --[[ int ]], bucket --[[ int ]]) ---@param entity number
---@param bucket number
---@return boolean
function QBCore.Functions.SetEntityBucket(entity, bucket)
if entity and bucket then if entity and bucket then
SetEntityRoutingBucket(entity, bucket) SetEntityRoutingBucket(entity, bucket)
QBCore.Entity_Buckets[entity] = {id = entity, bucket = bucket} QBCore.Entity_Buckets[entity] = {id = entity, bucket = bucket}
@@ -138,8 +174,10 @@ function QBCore.Functions.SetEntityBucket(entity --[[ int ]], bucket --[[ int ]]
end end
end end
-- Will return an array of all the player ids inside the current bucket ---Will return an array of all the player ids inside the current bucket
function QBCore.Functions.GetPlayersInBucket(bucket --[[ int ]]) ---@param bucket number
---@return table|boolean
function QBCore.Functions.GetPlayersInBucket(bucket)
local curr_bucket_pool = {} local curr_bucket_pool = {}
if QBCore.Player_Buckets and next(QBCore.Player_Buckets) then if QBCore.Player_Buckets and next(QBCore.Player_Buckets) then
for _, v in pairs(QBCore.Player_Buckets) do for _, v in pairs(QBCore.Player_Buckets) do
@@ -153,8 +191,11 @@ function QBCore.Functions.GetPlayersInBucket(bucket --[[ int ]])
end end
end end
-- Will return an array of all the entities inside the current bucket (not for player entities, use GetPlayersInBucket for that) ---Will return an array of all the entities inside the current bucket
function QBCore.Functions.GetEntitiesInBucket(bucket --[[ int ]]) ---(not for player entities, use GetPlayersInBucket for that)
---@param bucket number
---@return table|boolean
function QBCore.Functions.GetEntitiesInBucket(bucket)
local curr_bucket_pool = {} local curr_bucket_pool = {}
if QBCore.Entity_Buckets and next(QBCore.Entity_Buckets) then if QBCore.Entity_Buckets and next(QBCore.Entity_Buckets) then
for _, v in pairs(QBCore.Entity_Buckets) do for _, v in pairs(QBCore.Entity_Buckets) do
@@ -168,8 +209,13 @@ function QBCore.Functions.GetEntitiesInBucket(bucket --[[ int ]])
end end
end end
-- Server side vehicle creation with optional callback ---Server side vehicle creation with optional callback
-- the CreateVehicle RPC still uses the client for creation so players must be near ---the CreateVehicle RPC still uses the client for creation so players must be near
---@param source any
---@param model any
---@param coords vector
---@param warp boolean
---@return number
function QBCore.Functions.SpawnVehicle(source, model, coords, warp) function QBCore.Functions.SpawnVehicle(source, model, coords, warp)
local ped = GetPlayerPed(source) local ped = GetPlayerPed(source)
model = type(model) == 'string' and joaat(model) or model model = type(model) == 'string' and joaat(model) or model
@@ -186,9 +232,15 @@ function QBCore.Functions.SpawnVehicle(source, model, coords, warp)
return veh return veh
end end
-- Server side vehicle creation with optional callback ---Server side vehicle creation with optional callback
-- the CreateAutomobile native is still experimental but doesn't use client for creation ---the CreateAutomobile native is still experimental but doesn't use client for creation
-- doesn't work for all vehicles! ---doesn't work for all vehicles!
---comment
---@param source any
---@param model any
---@param coords vector
---@param warp boolean
---@return number
function QBCore.Functions.CreateVehicle(source, model, coords, warp) function QBCore.Functions.CreateVehicle(source, model, coords, warp)
model = type(model) == 'string' and joaat(model) or model model = type(model) == 'string' and joaat(model) or model
if not coords then coords = GetEntityCoords(GetPlayerPed(source)) end if not coords then coords = GetEntityCoords(GetPlayerPed(source)) end
@@ -199,7 +251,7 @@ function QBCore.Functions.CreateVehicle(source, model, coords, warp)
return veh return veh
end end
-- Paychecks (standalone - don't touch) ---Paychecks (standalone - don't touch)
function PaycheckInterval() function PaycheckInterval()
if next(QBCore.Players) then if next(QBCore.Players) then
for _, Player in pairs(QBCore.Players) do for _, Player in pairs(QBCore.Players) do
@@ -213,16 +265,16 @@ function PaycheckInterval()
if account < payment then -- Checks if company has enough money to pay society if account < payment then -- Checks if company has enough money to pay society
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('error.company_too_poor'), 'error') TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('error.company_too_poor'), 'error')
else else
Player.Functions.AddMoney('bank', payment) Player.Functions.AddMoney('bank', payment, 'paycheck')
exports['qb-management']:RemoveMoney(Player.PlayerData.job.name, payment) exports['qb-management']:RemoveMoney(Player.PlayerData.job.name, payment)
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment})) TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
end end
else else
Player.Functions.AddMoney('bank', payment) Player.Functions.AddMoney('bank', payment, 'paycheck')
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment})) TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
end end
else else
Player.Functions.AddMoney('bank', payment) Player.Functions.AddMoney('bank', payment, 'paycheck')
TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment})) TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, Lang:t('info.received_paycheck', {value = payment}))
end end
end end
@@ -234,17 +286,28 @@ end
-- Callback Functions -- -- Callback Functions --
-- Client Callback ---Trigger Client Callback
---@param name string
---@param source any
---@param cb function
---@param ... any
function QBCore.Functions.TriggerClientCallback(name, source, cb, ...) function QBCore.Functions.TriggerClientCallback(name, source, cb, ...)
QBCore.ClientCallbacks[name] = cb QBCore.ClientCallbacks[name] = cb
TriggerClientEvent('QBCore:Client:TriggerClientCallback', source, name, ...) TriggerClientEvent('QBCore:Client:TriggerClientCallback', source, name, ...)
end end
-- Server Callback ---Create Server Callback
---@param name string
---@param cb function
function QBCore.Functions.CreateCallback(name, cb) function QBCore.Functions.CreateCallback(name, cb)
QBCore.ServerCallbacks[name] = cb QBCore.ServerCallbacks[name] = cb
end end
---Trigger Serv er Callback
---@param name string
---@param source any
---@param cb function
---@param ... any
function QBCore.Functions.TriggerCallback(name, source, cb, ...) function QBCore.Functions.TriggerCallback(name, source, cb, ...)
if not QBCore.ServerCallbacks[name] then return end if not QBCore.ServerCallbacks[name] then return end
QBCore.ServerCallbacks[name](source, cb, ...) QBCore.ServerCallbacks[name](source, cb, ...)
@@ -252,21 +315,33 @@ end
-- Items -- Items
---Create a usable item
---@param item string
---@param data function
function QBCore.Functions.CreateUseableItem(item, data) function QBCore.Functions.CreateUseableItem(item, data)
QBCore.UsableItems[item] = data QBCore.UsableItems[item] = data
end end
---Checks if the given item is usable
---@param item string
---@return any
function QBCore.Functions.CanUseItem(item) function QBCore.Functions.CanUseItem(item)
return QBCore.UsableItems[item] return QBCore.UsableItems[item]
end end
---Use item
---@param source any
---@param item string
function QBCore.Functions.UseItem(source, item) function QBCore.Functions.UseItem(source, item)
if GetResourceState('qb-inventory') == 'missing' then return end if GetResourceState('qb-inventory') == 'missing' then return end
exports['qb-inventory']:UseItem(source, item) exports['qb-inventory']:UseItem(source, item)
end end
-- Kick Player ---Kick Player
---@param source any
---@param reason string
---@param setKickReason boolean
---@param deferrals boolean
function QBCore.Functions.Kick(source, reason, setKickReason, deferrals) function QBCore.Functions.Kick(source, reason, setKickReason, deferrals)
reason = '\n' .. reason .. '\n🔸 Check our Discord for further information: ' .. QBCore.Config.Server.Discord reason = '\n' .. reason .. '\n🔸 Check our Discord for further information: ' .. QBCore.Config.Server.Discord
if setKickReason then if setKickReason then
@@ -297,8 +372,9 @@ function QBCore.Functions.Kick(source, reason, setKickReason, deferrals)
end) end)
end end
-- Check if player is whitelisted, kept like this for backwards compatibility or future plans ---Check if player is whitelisted, kept like this for backwards compatibility or future plans
---@param source any
---@return boolean
function QBCore.Functions.IsWhitelisted(source) function QBCore.Functions.IsWhitelisted(source)
if not QBCore.Config.Server.Whitelist then return true end if not QBCore.Config.Server.Whitelist then return true end
if QBCore.Functions.HasPermission(source, QBCore.Config.Server.WhitelistPermission) then return true end if QBCore.Functions.HasPermission(source, QBCore.Config.Server.WhitelistPermission) then return true end
@@ -307,6 +383,9 @@ end
-- Setting & Removing Permissions -- Setting & Removing Permissions
---Add permission for player
---@param source any
---@param permission string
function QBCore.Functions.AddPermission(source, permission) function QBCore.Functions.AddPermission(source, permission)
if not IsPlayerAceAllowed(source, permission) then if not IsPlayerAceAllowed(source, permission) then
ExecuteCommand(('add_principal player.%s qbcore.%s'):format(source, permission)) ExecuteCommand(('add_principal player.%s qbcore.%s'):format(source, permission))
@@ -314,6 +393,9 @@ function QBCore.Functions.AddPermission(source, permission)
end end
end end
---Remove permission from player
---@param source any
---@param permission string
function QBCore.Functions.RemovePermission(source, permission) function QBCore.Functions.RemovePermission(source, permission)
if permission then if permission then
if IsPlayerAceAllowed(source, permission) then if IsPlayerAceAllowed(source, permission) then
@@ -332,6 +414,10 @@ end
-- Checking for Permission Level -- Checking for Permission Level
---Check if player has permission
---@param source any
---@param permission string
---@return boolean
function QBCore.Functions.HasPermission(source, permission) function QBCore.Functions.HasPermission(source, permission)
if type(permission) == "string" then if type(permission) == "string" then
if IsPlayerAceAllowed(source, permission) then return true end if IsPlayerAceAllowed(source, permission) then return true end
@@ -344,6 +430,9 @@ function QBCore.Functions.HasPermission(source, permission)
return false return false
end end
---Get the players permissions
---@param source any
---@return table
function QBCore.Functions.GetPermission(source) function QBCore.Functions.GetPermission(source)
local src = source local src = source
local perms = {} local perms = {}
@@ -355,8 +444,9 @@ function QBCore.Functions.GetPermission(source)
return perms return perms
end end
-- Opt in or out of admin reports ---Get admin messages opt-in state for player
---@param source any
---@return boolean
function QBCore.Functions.IsOptin(source) function QBCore.Functions.IsOptin(source)
local license = QBCore.Functions.GetIdentifier(source, 'license') local license = QBCore.Functions.GetIdentifier(source, 'license')
if not license or not QBCore.Functions.HasPermission(source, 'admin') then return false end if not license or not QBCore.Functions.HasPermission(source, 'admin') then return false end
@@ -364,6 +454,8 @@ function QBCore.Functions.IsOptin(source)
return Player.PlayerData.optin return Player.PlayerData.optin
end end
---Toggle opt-in to admin messages
---@param source any
function QBCore.Functions.ToggleOptin(source) function QBCore.Functions.ToggleOptin(source)
local license = QBCore.Functions.GetIdentifier(source, 'license') local license = QBCore.Functions.GetIdentifier(source, 'license')
if not license or not QBCore.Functions.HasPermission(source, 'admin') then return end if not license or not QBCore.Functions.HasPermission(source, 'admin') then return end
@@ -372,8 +464,9 @@ function QBCore.Functions.ToggleOptin(source)
Player.Functions.SetPlayerData('optin', Player.PlayerData.optin) Player.Functions.SetPlayerData('optin', Player.PlayerData.optin)
end end
-- Check if player is banned ---Check if player is banned
---@param source any
---@return boolean, string?
function QBCore.Functions.IsPlayerBanned(source) function QBCore.Functions.IsPlayerBanned(source)
local plicense = QBCore.Functions.GetIdentifier(source, 'license') local plicense = QBCore.Functions.GetIdentifier(source, 'license')
local result = MySQL.single.await('SELECT * FROM bans WHERE license = ?', { plicense }) local result = MySQL.single.await('SELECT * FROM bans WHERE license = ?', { plicense })
@@ -387,8 +480,9 @@ function QBCore.Functions.IsPlayerBanned(source)
return false return false
end end
-- Check for duplicate license ---Check for duplicate license
---@param license any
---@return boolean
function QBCore.Functions.IsLicenseInUse(license) function QBCore.Functions.IsLicenseInUse(license)
local players = GetPlayers() local players = GetPlayers()
for _, player in pairs(players) do for _, player in pairs(players) do
@@ -406,16 +500,30 @@ end
-- Utility functions -- Utility functions
---Check if a player has an item [deprecated]
---@param source any
---@param items table|string
---@param amount number
---@return boolean
function QBCore.Functions.HasItem(source, items, amount) function QBCore.Functions.HasItem(source, items, amount)
if GetResourceState('qb-inventory') == 'missing' then return end if GetResourceState('qb-inventory') == 'missing' then return end
return exports['qb-inventory']:HasItem(source, items, amount) return exports['qb-inventory']:HasItem(source, items, amount)
end end
---Notify
---@param source any
---@param text string
---@param type string
---@param length number
function QBCore.Functions.Notify(source, text, type, length) function QBCore.Functions.Notify(source, text, type, length)
TriggerClientEvent('QBCore:Notify', source, text, type, length) TriggerClientEvent('QBCore:Notify', source, text, type, length)
end end
--- SQL Pattern Matching ---???? ... ok
---@param source any
---@param data any
---@param pattern any
---@return boolean
function QBCore.Functions.PrepForSQL(source, data, pattern) function QBCore.Functions.PrepForSQL(source, data, pattern)
data = tostring(data) data = tostring(data)
local src = source local src = source
+7 -1
View File
@@ -25,6 +25,7 @@ QBShared.Items = {
['weapon_handcuffs'] = {['name'] = 'weapon_handcuffs', ['label'] = 'Handcuffs', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_handcuffs.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A pair of lockable linked metal rings for securing a prisoner\'s wrists'}, ['weapon_handcuffs'] = {['name'] = 'weapon_handcuffs', ['label'] = 'Handcuffs', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_handcuffs.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A pair of lockable linked metal rings for securing a prisoner\'s wrists'},
['weapon_bread'] = {['name'] = 'weapon_bread', ['label'] = 'Baquette', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'baquette.png', ['unique'] = true, ['useable'] = false, ['description'] = 'Bread...?'}, ['weapon_bread'] = {['name'] = 'weapon_bread', ['label'] = 'Baquette', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'baquette.png', ['unique'] = true, ['useable'] = false, ['description'] = 'Bread...?'},
['weapon_stone_hatchet'] = {['name'] = 'weapon_stone_hatchet', ['label'] = 'Stone Hatchet', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_stone_hatchet.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stone ax'}, ['weapon_stone_hatchet'] = {['name'] = 'weapon_stone_hatchet', ['label'] = 'Stone Hatchet', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_stone_hatchet.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Stone ax'},
['weapon_candycane'] = {['name'] = 'weapon_candycane', ['label'] = 'Candy Cane', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_candycande', ['unique'] = true, ['useable'] = true, ['description'] = 'Candy Cane'},
-- Handguns -- Handguns
['weapon_pistol'] = {['name'] = 'weapon_pistol', ['label'] = 'Walther P99', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_pistol.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A small firearm designed to be held in one hand'}, ['weapon_pistol'] = {['name'] = 'weapon_pistol', ['label'] = 'Walther P99', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_pistol.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A small firearm designed to be held in one hand'},
@@ -46,6 +47,7 @@ QBShared.Items = {
['weapon_ceramicpistol'] = {['name'] = 'weapon_ceramicpistol', ['label'] = 'Ceramic Pistol', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_ceramicpistol.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Ceramicpistol'}, ['weapon_ceramicpistol'] = {['name'] = 'weapon_ceramicpistol', ['label'] = 'Ceramic Pistol', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_ceramicpistol.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Ceramicpistol'},
['weapon_navyrevolver'] = {['name'] = 'weapon_navyrevolver', ['label'] = 'Navy Revolver', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_navyrevolver.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Navyrevolver'}, ['weapon_navyrevolver'] = {['name'] = 'weapon_navyrevolver', ['label'] = 'Navy Revolver', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_navyrevolver.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Navyrevolver'},
['weapon_gadgetpistol'] = {['name'] = 'weapon_gadgetpistol', ['label'] = 'Perico Pistol', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_gadgetpistol.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Gadgetpistol'}, ['weapon_gadgetpistol'] = {['name'] = 'weapon_gadgetpistol', ['label'] = 'Perico Pistol', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_gadgetpistol.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Gadgetpistol'},
['weapon_pistolxm3'] = {['name'] = 'weapon_pistolxm3', ['label'] = 'Pistol XM3', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_PISTOL', ['image'] = 'weapon_pistolxm3.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Pistol XM3'},
-- Submachine Guns -- Submachine Guns
['weapon_microsmg'] = {['name'] = 'weapon_microsmg', ['label'] = 'Micro SMG', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_SMG', ['image'] = 'weapon_microsmg.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A handheld lightweight machine gun'}, ['weapon_microsmg'] = {['name'] = 'weapon_microsmg', ['label'] = 'Micro SMG', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_SMG', ['image'] = 'weapon_microsmg.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A handheld lightweight machine gun'},
@@ -103,6 +105,7 @@ QBShared.Items = {
['weapon_minigun'] = {['name'] = 'weapon_minigun', ['label'] = 'Minigun', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_MINIGUN', ['image'] = 'weapon_minigun.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A portable machine gun consisting of a rotating cluster of six barrels and capable of variable rates of fire of up to 6,000 rounds per minute'}, ['weapon_minigun'] = {['name'] = 'weapon_minigun', ['label'] = 'Minigun', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_MINIGUN', ['image'] = 'weapon_minigun.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A portable machine gun consisting of a rotating cluster of six barrels and capable of variable rates of fire of up to 6,000 rounds per minute'},
['weapon_firework'] = {['name'] = 'weapon_firework', ['label'] = 'Firework Launcher', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_firework.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A device containing gunpowder and other combustible chemicals that causes a spectacular explosion when ignited'}, ['weapon_firework'] = {['name'] = 'weapon_firework', ['label'] = 'Firework Launcher', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_firework.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A device containing gunpowder and other combustible chemicals that causes a spectacular explosion when ignited'},
['weapon_railgun'] = {['name'] = 'weapon_railgun', ['label'] = 'Railgun', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_railgun.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A weapon that uses electromagnetic force to launch high velocity projectiles'}, ['weapon_railgun'] = {['name'] = 'weapon_railgun', ['label'] = 'Railgun', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_railgun.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A weapon that uses electromagnetic force to launch high velocity projectiles'},
['weapon_railgunxm3'] = {['name'] = 'weapon_railgunxm3', ['label'] = 'Railgun XM3', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_railgunxm3.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A weapon that uses electromagnetic force to launch high velocity projectiles'},
['weapon_hominglauncher'] = {['name'] = 'weapon_hominglauncher', ['label'] = 'Homing Launcher', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_STINGER', ['image'] = 'weapon_hominglauncher.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A weapon fitted with an electronic device that enables it to find and hit a target'}, ['weapon_hominglauncher'] = {['name'] = 'weapon_hominglauncher', ['label'] = 'Homing Launcher', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_STINGER', ['image'] = 'weapon_hominglauncher.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A weapon fitted with an electronic device that enables it to find and hit a target'},
['weapon_compactlauncher'] = {['name'] = 'weapon_compactlauncher', ['label'] = 'Compact Launcher', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_compactlauncher.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A compact grenade launcher'}, ['weapon_compactlauncher'] = {['name'] = 'weapon_compactlauncher', ['label'] = 'Compact Launcher', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = nil, ['image'] = 'weapon_compactlauncher.png', ['unique'] = true, ['useable'] = false, ['description'] = 'A compact grenade launcher'},
['weapon_rayminigun'] = {['name'] = 'weapon_rayminigun', ['label'] = 'Widowmaker', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_MINIGUN', ['image'] = 'weapon_rayminigun.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Rayminigun'}, ['weapon_rayminigun'] = {['name'] = 'weapon_rayminigun', ['label'] = 'Widowmaker', ['weight'] = 1000, ['type'] = 'weapon', ['ammotype'] = 'AMMO_MINIGUN', ['image'] = 'weapon_rayminigun.png', ['unique'] = true, ['useable'] = true, ['description'] = 'Weapon Rayminigun'},
@@ -281,8 +284,8 @@ QBShared.Items = {
['cokebaggy'] = {['name'] = 'cokebaggy', ['label'] = 'Bag of Coke', ['weight'] = 0, ['type'] = 'item', ['image'] = 'cocaine_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy real quick'}, ['cokebaggy'] = {['name'] = 'cokebaggy', ['label'] = 'Bag of Coke', ['weight'] = 0, ['type'] = 'item', ['image'] = 'cocaine_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy real quick'},
['crack_baggy'] = {['name'] = 'crack_baggy', ['label'] = 'Bag of Crack', ['weight'] = 0, ['type'] = 'item', ['image'] = 'crack_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy faster'}, ['crack_baggy'] = {['name'] = 'crack_baggy', ['label'] = 'Bag of Crack', ['weight'] = 0, ['type'] = 'item', ['image'] = 'crack_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'To get happy faster'},
['xtcbaggy'] = {['name'] = 'xtcbaggy', ['label'] = 'Bag of XTC', ['weight'] = 0, ['type'] = 'item', ['image'] = 'xtc_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Pop those pills baby'}, ['xtcbaggy'] = {['name'] = 'xtcbaggy', ['label'] = 'Bag of XTC', ['weight'] = 0, ['type'] = 'item', ['image'] = 'xtc_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Pop those pills baby'},
['weed_brick'] = {['name'] = 'weed_brick', ['label'] = 'Weed Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'weed_brick.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = '1KG Weed Brick to sell to large customers.'},
['coke_brick'] = {['name'] = 'coke_brick', ['label'] = 'Coke Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'coke_brick.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Heavy package of cocaine, mostly used for deals and takes a lot of space'}, ['coke_brick'] = {['name'] = 'coke_brick', ['label'] = 'Coke Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'coke_brick.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Heavy package of cocaine, mostly used for deals and takes a lot of space'},
['weed_brick'] = {['name'] = 'weed_brick', ['label'] = 'Weed Brick', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'weed_brick.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = '1KG Weed Brick to sell to large customers.'},
['coke_small_brick'] = {['name'] = 'coke_small_brick', ['label'] = 'Coke Package', ['weight'] = 350, ['type'] = 'item', ['image'] = 'coke_small_brick.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Small package of cocaine, mostly used for deals and takes a lot of space'}, ['coke_small_brick'] = {['name'] = 'coke_small_brick', ['label'] = 'Coke Package', ['weight'] = 350, ['type'] = 'item', ['image'] = 'coke_small_brick.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Small package of cocaine, mostly used for deals and takes a lot of space'},
['oxy'] = {['name'] = 'oxy', ['label'] = 'Prescription Oxy', ['weight'] = 0, ['type'] = 'item', ['image'] = 'oxy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'The Label Has Been Ripped Off'}, ['oxy'] = {['name'] = 'oxy', ['label'] = 'Prescription Oxy', ['weight'] = 0, ['type'] = 'item', ['image'] = 'oxy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'The Label Has Been Ripped Off'},
['meth'] = {['name'] = 'meth', ['label'] = 'Meth', ['weight'] = 100, ['type'] = 'item', ['image'] = 'meth_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A baggie of Meth'}, ['meth'] = {['name'] = 'meth', ['label'] = 'Meth', ['weight'] = 100, ['type'] = 'item', ['image'] = 'meth_baggy.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A baggie of Meth'},
@@ -393,4 +396,7 @@ QBShared.Items = {
['markedbills'] = {['name'] = 'markedbills', ['label'] = 'Marked Money', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'markedbills.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Money?'}, ['markedbills'] = {['name'] = 'markedbills', ['label'] = 'Marked Money', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'markedbills.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Money?'},
['labkey'] = {['name'] = 'labkey', ['label'] = 'Key', ['weight'] = 500, ['type'] = 'item', ['image'] = 'labkey.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Key for a lock...?'}, ['labkey'] = {['name'] = 'labkey', ['label'] = 'Key', ['weight'] = 500, ['type'] = 'item', ['image'] = 'labkey.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Key for a lock...?'},
['printerdocument'] = {['name'] = 'printerdocument', ['label'] = 'Document', ['weight'] = 500, ['type'] = 'item', ['image'] = 'printerdocument.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A nice document'}, ['printerdocument'] = {['name'] = 'printerdocument', ['label'] = 'Document', ['weight'] = 500, ['type'] = 'item', ['image'] = 'printerdocument.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A nice document'},
['newscam'] = {['name'] = 'newscam', ['label'] = 'News Camera', ['weight'] = 100, ['type'] = 'item', ['image'] = 'newscam.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A camera for the news'},
['newsmic'] = {['name'] = 'newsmic', ['label'] = 'News Microphone', ['weight'] = 100, ['type'] = 'item', ['image'] = 'newsmic.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A microphone for the news'},
['newsbmic'] = {['name'] = 'newsbmic', ['label'] = 'Boom Microphone', ['weight'] = 100, ['type'] = 'item', ['image'] = 'newsbmic.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'A Useable BoomMic'},
} }
+1
View File
@@ -46,6 +46,7 @@ QBShared.Jobs = {
}, },
['ambulance'] = { ['ambulance'] = {
label = 'EMS', label = 'EMS',
type = 'ems',
defaultDuty = true, defaultDuty = true,
offDutyPay = false, offDutyPay = false,
grades = { grades = {
+1 -1
View File
@@ -20,7 +20,7 @@ local function translateKey(phrase, subs)
-- Initial Scan over result looking for substituions -- Initial Scan over result looking for substituions
for k, v in pairs(subs) do for k, v in pairs(subs) do
local templateToFind = '%%{' .. k .. '}' local templateToFind = '%{' .. k .. '}'
result = result:gsub(templateToFind, tostring(v)) -- string to allow all types result = result:gsub(templateToFind, tostring(v)) -- string to allow all types
end end
+6 -6
View File
@@ -3,6 +3,12 @@ QBShared = QBShared or {}
local StringCharset = {} local StringCharset = {}
local NumberCharset = {} local NumberCharset = {}
QBShared.StarterItems = {
['phone'] = { amount = 1, item = 'phone' },
['id_card'] = { amount = 1, item = 'id_card' },
['driver_license'] = { amount = 1, item = 'driver_license' },
}
for i = 48, 57 do NumberCharset[#NumberCharset + 1] = string.char(i) end for i = 48, 57 do NumberCharset[#NumberCharset + 1] = string.char(i) end
for i = 65, 90 do StringCharset[#StringCharset + 1] = string.char(i) end for i = 65, 90 do StringCharset[#StringCharset + 1] = string.char(i) end
for i = 97, 122 do StringCharset[#StringCharset + 1] = string.char(i) end for i = 97, 122 do StringCharset[#StringCharset + 1] = string.char(i) end
@@ -75,12 +81,6 @@ function QBShared.SetDefaultVehicleExtras(vehicle, config)
end end
end end
QBShared.StarterItems = {
['phone'] = { amount = 1, item = 'phone' },
['id_card'] = { amount = 1, item = 'id_card' },
['driver_license'] = { amount = 1, item = 'driver_license' },
}
QBShared.MaleNoGloves = { QBShared.MaleNoGloves = {
[0] = true, [0] = true,
[1] = true, [1] = true,
+150 -5
View File
@@ -1,5 +1,4 @@
QBShared = QBShared or {} QBShared = QBShared or {}
QBShared.VehicleHashes = {}
QBShared.Vehicles = { QBShared.Vehicles = {
--- Compacts --- Compacts
@@ -5398,8 +5397,154 @@ QBShared.Vehicles = {
['hash'] = `tiptruck2`, ['hash'] = `tiptruck2`,
['shop'] = 'truck', ['shop'] = 'truck',
}, },
['entity3'] = { --DLC +set sv_enforceGameBuild 2802
['name'] = 'Entity MT',
['brand'] = 'Overflod',
['model'] = 'entity3',
['price'] = 200000,
['category'] = 'super',
['categoryLabel'] = 'Super',
['hash'] = `entity3`,
['shop'] = 'luxury',
},
['everon2'] = {
['name'] = 'Everon Hotring',
['brand'] = 'Karin',
['model'] = 'everon2',
['price'] = 80000,
['category'] = 'sports',
['categoryLabel'] = 'Sports',
['hash'] = `everon`,
['shop'] = 'pdm',
},
['issi8'] = {
['name'] = 'Issi Rally',
['brand'] = 'Weeny',
['model'] = 'issi8',
['price'] = 10000,
['category'] = 'sports',
['categoryLabel'] = 'Sports',
['hash'] = `issi8`,
['shop'] = 'pdm',
},
['journey2'] = {
['name'] = 'Journey II',
['brand'] = 'Zirconium',
['model'] = 'journey2',
['price'] = 7000,
['category'] = 'vans',
['categoryLabel'] = 'Vans',
['hash'] = `journey2`,
['shop'] = 'pdm',
},
['manchez3'] = {
['name'] = 'Manchez Scout Classic',
['brand'] = 'Maibatsu',
['model'] = 'manchez3',
['price'] = 15000,
['category'] = 'motorcycles',
['categoryLabel'] = 'Motorcycles',
['hash'] = `manchez3`,
['shop'] = 'pdm',
},
['r300'] = {
['name'] = '300R',
['brand'] = 'Annis',
['model'] = 'r300',
['price'] = 56000,
['category'] = 'sports',
['categoryLabel'] = 'Sports',
['hash'] = `r300`,
['shop'] = 'pdm',
},
['surfer3'] = {
['name'] = 'Surfer Custom',
['brand'] = 'BF',
['model'] = 'surfer3',
['price'] = 15000,
['category'] = 'vans',
['categoryLabel'] = 'Vans',
['hash'] = `surfer3`,
['shop'] = 'pdm',
},
['tahoma'] = {
['name'] = 'Tahoma Coupe',
['brand'] = 'Declasse',
['model'] = 'tahoma',
['price'] = 12000,
['category'] = 'coupes',
['categoryLabel'] = 'Coupes',
['hash'] = `tahoma`,
['shop'] = 'pdm',
},
['tulip2'] = {
['name'] = 'Tulip M-100',
['brand'] = 'Declasse',
['model'] = 'tulip2',
['price'] = 80000,
['category'] = 'muscle',
['categoryLabel'] = 'Muscle',
['hash'] = `tulip2`,
['shop'] = 'pdm',
},
['powersurge'] = {
['name'] = 'Powersurge',
['brand'] = 'Western',
['model'] = 'powersurge',
['price'] = 7000,
['category'] = 'motorcycles',
['categoryLabel'] = 'Motorcycles',
['hash'] = `powersurge`,
['shop'] = 'pdm',
},
['broadway'] = {
['name'] = 'Broadway',
['brand'] = 'Classique',
['model'] = 'broadway',
['price'] = 20000,
['category'] = 'coupes',
['categoryLabel'] = 'Coupes',
['hash'] = `broadway`,
['shop'] = 'pdm',
},
['panthere'] = {
['name'] = 'Panthere',
['brand'] = 'Toundra',
['model'] = 'panthere',
['price'] = 55000,
['category'] = 'sports',
['categoryLabel'] = 'Sports',
['hash'] = `panthere`,
['shop'] = 'pdm',
},
['boor'] = {
['name'] = 'Boor',
['brand'] = 'Karin',
['model'] = 'boor',
['price'] = 23000,
['category'] = 'compacts',
['categoryLabel'] = 'Compacts',
['hash'] = `boor`,
['shop'] = 'pdm',
},
['eudora'] = {
['name'] = 'Eudora',
['brand'] = 'Willard',
['model'] = 'eudora',
['price'] = 17000,
['category'] = 'sedans',
['categoryLabel'] = 'Sedans',
['hash'] = `eudora`,
['shop'] = 'pdm',
},
['virtue'] = {
['name'] = 'Virtue',
['brand'] = 'Ocelot',
['model'] = 'virtue',
['price'] = 72000,
['category'] = 'super',
['categoryLabel'] = 'Super',
['hash'] = `virtue`,
['shop'] = 'luxury',
},
} }
for _, v in pairs(QBShared.Vehicles) do
QBShared.VehicleHashes[v.hash] = v
end
+3
View File
@@ -25,6 +25,7 @@ QBShared.Weapons = {
[`weapon_handcuffs`] = {['name'] = 'weapon_handcuffs', ['label'] = 'Handcuffs', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Melee killed / Whacked / Executed / Beat down / Murdered / Battered'}, [`weapon_handcuffs`] = {['name'] = 'weapon_handcuffs', ['label'] = 'Handcuffs', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Melee killed / Whacked / Executed / Beat down / Murdered / Battered'},
[`weapon_bread`] = {['name'] = 'weapon_bread', ['label'] = 'Baquette', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Melee killed / Whacked / Executed / Beat down / Murdered / Battered'}, [`weapon_bread`] = {['name'] = 'weapon_bread', ['label'] = 'Baquette', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Melee killed / Whacked / Executed / Beat down / Murdered / Battered'},
[`weapon_stone_hatchet`] = {['name'] = 'weapon_stone_hatchet', ['label'] = 'Stone Hatchet', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Knifed / Stabbed / Eviscerated'}, [`weapon_stone_hatchet`] = {['name'] = 'weapon_stone_hatchet', ['label'] = 'Stone Hatchet', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Knifed / Stabbed / Eviscerated'},
[`weapon_candycane`] = {['name'] = 'weapon_candycane', ['label'] = 'Candy Cane', ['weapontype'] = 'Melee', ['ammotype'] = nil, ['damagereason'] = 'Melee Killed / Whacked / Executed / Beat down / Musrdered / Battered / Candy Caned'},
-- Handguns -- Handguns
[`weapon_pistol`] = {['name'] = 'weapon_pistol', ['label'] = 'Pistol', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plugged / Bust a cap in'}, [`weapon_pistol`] = {['name'] = 'weapon_pistol', ['label'] = 'Pistol', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plugged / Bust a cap in'},
@@ -47,6 +48,7 @@ QBShared.Weapons = {
[`weapon_navyrevolver`] = {['name'] = 'weapon_navyrevolver', ['label'] = 'Navy Revolver', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plugged / Bust a cap in'}, [`weapon_navyrevolver`] = {['name'] = 'weapon_navyrevolver', ['label'] = 'Navy Revolver', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plugged / Bust a cap in'},
[`weapon_gadgetpistol`] = {['name'] = 'weapon_gadgetpistol', ['label'] = 'Gadget Pistol', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plugged / Bust a cap in'}, [`weapon_gadgetpistol`] = {['name'] = 'weapon_gadgetpistol', ['label'] = 'Gadget Pistol', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plugged / Bust a cap in'},
[`weapon_stungun_mp`] = {['name'] = 'weapon_stungun_mp', ['label'] = 'Taser', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_STUNGUN', ['damagereason'] = 'Died'}, [`weapon_stungun_mp`] = {['name'] = 'weapon_stungun_mp', ['label'] = 'Taser', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_STUNGUN', ['damagereason'] = 'Died'},
[`weapon_pistolxm3`] = {['name'] = 'weapon_pistolxm3', ['label'] = 'Pistol XM3', ['weapontype'] = 'Pistol', ['ammotype'] = 'AMMO_PISTOL', ['damagereason'] = 'Pistoled / Blasted / Plaugged / Bust a cap in'},
-- Submachine Guns -- Submachine Guns
[`weapon_microsmg`] = {['name'] = 'weapon_microsmg', ['label'] = 'Micro SMG', ['weapontype'] = 'Submachine Gun', ['ammotype'] = 'AMMO_SMG', ['damagereason'] = 'Riddled / Drilled / Finished / Submachine Gunned'}, [`weapon_microsmg`] = {['name'] = 'weapon_microsmg', ['label'] = 'Micro SMG', ['weapontype'] = 'Submachine Gun', ['ammotype'] = 'AMMO_SMG', ['damagereason'] = 'Riddled / Drilled / Finished / Submachine Gunned'},
@@ -105,6 +107,7 @@ QBShared.Weapons = {
[`weapon_minigun`] = {['name'] = 'weapon_minigun', ['label'] = 'Minigun', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = 'AMMO_MINIGUN', ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'}, [`weapon_minigun`] = {['name'] = 'weapon_minigun', ['label'] = 'Minigun', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = 'AMMO_MINIGUN', ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},
[`weapon_firework`] = {['name'] = 'weapon_firework', ['label'] = 'Firework Launcher', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'}, [`weapon_firework`] = {['name'] = 'weapon_firework', ['label'] = 'Firework Launcher', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},
[`weapon_railgun`] = {['name'] = 'weapon_railgun', ['label'] = 'Railgun', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'}, [`weapon_railgun`] = {['name'] = 'weapon_railgun', ['label'] = 'Railgun', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},
[`weapon_railgunxm3`] = {['name'] = 'weapon_railgunxm3', ['label'] = 'Railgun XM3', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},
[`weapon_hominglauncher`] = {['name'] = 'weapon_hominglauncher', ['label'] = 'Homing Launcher', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = 'AMMO_STINGER', ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'}, [`weapon_hominglauncher`] = {['name'] = 'weapon_hominglauncher', ['label'] = 'Homing Launcher', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = 'AMMO_STINGER', ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},
[`weapon_compactlauncher`] = {['name'] = 'weapon_compactlauncher', ['label'] = 'Compact Launcher', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'}, [`weapon_compactlauncher`] = {['name'] = 'weapon_compactlauncher', ['label'] = 'Compact Launcher', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = nil, ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},
[`weapon_rayminigun`] = {['name'] = 'weapon_rayminigun', ['label'] = 'Ray Minigun', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = 'AMMO_MINIGUN', ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'}, [`weapon_rayminigun`] = {['name'] = 'weapon_rayminigun', ['label'] = 'Ray Minigun', ['weapontype'] = 'Heavy Weapons', ['ammotype'] = 'AMMO_MINIGUN', ['damagereason'] = 'Killed / Exploded / Obliterated / Destroyed / Erased / Annihilated'},