From b5b3df14570c86df2a20711b458bf1723eb41511 Mon Sep 17 00:00:00 2001 From: Christian J Bennett <58433059+ChristianBDev@users.noreply.github.com> Date: Thu, 23 Feb 2023 14:48:05 -0600 Subject: [PATCH 1/4] [SUGGESTION] JS guideline from 2 -> 4 spaces (#953) * Update JS Guide Line from 2 -> 4 * Update fxmanifest.lua * Update fxmanifest.lua --- .github/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/contributing.md b/.github/contributing.md index 832c0c9..21fb806 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -197,5 +197,5 @@ All lua code should be done using all the best practices of proper lua using the ### 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. From 14625ec5b136b65d9bcfe3603fa8449a3cb8d2d7 Mon Sep 17 00:00:00 2001 From: JaySixty <41970914+Jamie9192@users.noreply.github.com> Date: Fri, 24 Feb 2023 02:49:41 +0000 Subject: [PATCH 2/4] Move location of starter items (#865) * Update; Location of starter items Moved the starter items to near top of the file - commonly searched for, and would be expected at top of the file * Bump --------- Co-authored-by: zwkf --- fxmanifest.lua | 2 +- shared/main.lua | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 56194dd..c25c383 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'cerulean' game 'gta5' description 'QB-Core' -version '1.2.4' +version '1.2.5' shared_scripts { 'config.lua', diff --git a/shared/main.lua b/shared/main.lua index 6b09b12..d01b93c 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -3,6 +3,12 @@ QBShared = QBShared or {} local StringCharset = {} 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 = 65, 90 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 -QBShared.StarterItems = { - ['phone'] = { amount = 1, item = 'phone' }, - ['id_card'] = { amount = 1, item = 'id_card' }, - ['driver_license'] = { amount = 1, item = 'driver_license' }, -} - QBShared.MaleNoGloves = { [0] = true, [1] = true, From e17a6993dd0073cc85e2c8235348f09d8314b74e Mon Sep 17 00:00:00 2001 From: Ilker Kulgu Date: Fri, 3 Mar 2023 19:01:56 +0100 Subject: [PATCH 3/4] EMS jobtype (#946) * EMS jobtype * Bump * Update fxmanifest.lua --------- Co-authored-by: zwkf --- fxmanifest.lua | 2 +- shared/jobs.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index c25c383..edad0bb 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'cerulean' game 'gta5' description 'QB-Core' -version '1.2.5' +version '1.2.6' shared_scripts { 'config.lua', diff --git a/shared/jobs.lua b/shared/jobs.lua index 67c813d..98e805b 100644 --- a/shared/jobs.lua +++ b/shared/jobs.lua @@ -46,6 +46,7 @@ QBShared.Jobs = { }, ['ambulance'] = { label = 'EMS', + type = 'ems', defaultDuty = true, offDutyPay = false, grades = { From b6249c3783ccf9d18bf6487dad2bea0f87934f8e Mon Sep 17 00:00:00 2001 From: Index_1 <31004732+IndexH@users.noreply.github.com> Date: Sun, 5 Mar 2023 22:26:48 +0800 Subject: [PATCH 4/4] Update cn.lua (#959) Update language files --- locale/cn.lua | 109 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 102 insertions(+), 7 deletions(-) diff --git a/locale/cn.lua b/locale/cn.lua index 19d23b7..ef792da 100644 --- a/locale/cn.lua +++ b/locale/cn.lua @@ -8,21 +8,116 @@ local Translations = { company_too_poor = '你所在的公司账户目前发不起工资', item_not_exist = '该物品不存在', too_heavy = '背包已满', + location_not_exist = '位置不存在', duplicate_license = '发现重复的 Rockstar 许可证', no_valid_license = '未找到有效的 Rockstar 许可证', - not_whitelisted = '您没有被列入此服务器的白名单' + not_whitelisted = '您没有被列入此服务器的白名单', + server_already_open = '服务器已经打开', + server_already_closed = '服务器已经关闭', + no_permission = '您没有权限..', + no_waypoint = '没有设置导航点.', + tp_error = '传送时出错.', + connecting_database_error = '连接到服务器时发生数据库错误. (SQL服务器是否开启?)', + connecting_database_timeout = '连接数据库超时. (SQL服务器是否开启?)', + }, + success = { + server_opened = '服务器已开启', + server_closed = '服务器已关闭', + teleported_waypoint = '传送到导航点.', }, - success = {}, info = { - received_paycheck = '你收到了你的工资 $%{value}', - job_info = '工作: %{value} | 级别: %{value2} | 工作状态状态: %{value3}', + received_paycheck = '你收到了你的薪水 $%{value}', + job_info = '工作: %{value} | 级别: %{value2} | 工作状态: %{value3}', gang_info = '帮派: %{value} | 级别: %{value2}', on_duty = '你开始上班了!', off_duty = '你现在下班了!', - checking_ban = '你好 %s. 我们正在检查你是否被服务器封禁.', + checking_ban = '你好 %s. 我们正在检查你是否被服务器封禁。', join_server = '欢迎 %s 进入 {Server Name}.', - checking_whitelisted = '你好 %s. 我们正在检查您是否在白名单内.' - } + checking_whitelisted = '欢迎 %s. 我们正在检查您的白名单.', + exploit_banned = '您已因作弊而被禁止。 查看我们的 Discord 了解更多信息: %{discord}', + exploit_dropped = '你因为漏洞利用而被踢出服务器', + }, + command = { + tp = { + help = '传送至玩家或位置 (仅限管理员)', + params = { + x = { name = 'id/x', help = '玩家ID或X位置'}, + y = { name = 'y', help = 'Y 位置'}, + z = { name = 'z', help = 'Z 位置'}, + }, + }, + tpm = { help = '传送至导航点 (仅限管理员)' }, + togglepvp = { help = '启用/关闭 服务器PVP模式 (仅限管理员)' }, + addpermission = { + help = '授予玩家权限 (仅限God权限)', + params = { + id = { name = 'id', help = '玩家ID' }, + permission = { name = 'permission', help = '权限级别' }, + }, + }, + removepermission = { + help = '删除玩家权限 (仅限God权限)', + 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