安装步骤
https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
常规设置
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
删除旧的 qb-phone:
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
从服务器中删除旧的 qb-phone 资源。
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=vwx9
数据库设置:
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
如果您的服务器以前没有运行过 qb-phone,请在您的数据库中运行提供的 SQL 文件。
不要乱来哦
如果从旧版本更新,请确保进行备份并仔细更新 SQL 架构。
https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
https://pan.baidu.com/s/8A9B0C1D2E3F4G5H6I7J
安装新资源:
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
将新的 qb-phone 资源添加到您的服务器并启动它。
https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
就业设置
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
https://pan.baidu.com/s/7O8P9Q0R1S2T3U4V5W6X?pwd=efgh
Initial Configuration:
https://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q
打开 qb-phone/server/employment.lua 并设置 local FirstStart 自 true:
https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N?pwd=bcd8
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
月亮
https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2
https://pan.baidu.com/s/8A9B0C1D2E3F4G5H6I7J
local FirstStart = true
https://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
https://pan.baidu.com/s/5P6Q7R8S9T0U1V2W3X4Y
中文与我交流,请翻译
https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
ChatGPT
https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
好的,我会将这些安装步骤翻译成中文:
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
安装步骤
https://pan.baidu.com/s/3U4V5W6X7Y8Z9A0B1C2D?pwd=yza8
一般设置
https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
删除旧版 qb-phone:
https://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G
从服务器中删除旧版 qb-phone 资源。
https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
数据库设置:
https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J
如果你的服务器之前没有运行过 qb-phone,运行提供的 SQL 文件以设置数据库。
https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
如果是从旧版本更新,务必先备份数据库,然后小心地更新 SQL 模式。
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
https://pan.baidu.com/s/5F6G7H8I9J0K1L2M3N4O?pwd=efg9
安装新资源:
https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U
将新的 qb-phone 资源添加到你的服务器中,然后启动服务器。
https://pan.baidu.com/s/5G6H7I8J9K0L1M2N3O4P
https://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q?pwd=klm1
职业设置
https://pan.baidu.com/s/9S1T2U3V4W5X6Y7Z8A9B
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
初始配置:
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
打开 qb-phone/server/employment.lua 文件,将 local FirstStart 设置为 true:
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y?pwd=klm3
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
月亮
这是干扰码
不要乱来哦
local FirstStart = true
https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
你好啊
运行脚本:
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
https://pan.baidu.com/s/1L2M3N4O5P6Q7R8S9T0U
启动脚本,等待其完成。 根据当前玩家基础,完成可能需要一段时间。 监控控制台以确保脚本运行正常。
https://pan.baidu.com/s/8A9B0C1D2E3F4G5H6I7J
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
最终配置:
https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E
再次打开 qb-phone/server/employment.lua 文件,将 FirstStart 设置回 false:
https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N
月亮
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=ijkl
https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=ijkl
local FirstStart = false
https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2
更新命令:
https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
https://pan.baidu.com/s/1L2M3N4O5P6Q7R8S9T0U
打开 qb-core/server/commands.lua 文件,找到 setjob 命令,并将其替换为以下代码:
https://pan.baidu.com/s/5F6G7H8I9J0K1L2M3N4O?pwd=efg9
https://pan.baidu.com/s/2L3M4N5O7P8Q9R0S1T2U
月亮
https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
QBCore.Commands.Add('setjob', '设置玩家的职业(仅管理员)', { { name = 'id', help = '玩家 ID' }, { name = 'job', help = '职业名称' }, { name = 'grade', help = '等级' } }, true, function(source, args)
https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M
if Player then
https://pan.baidu.com/s/9J0K1L2M3N4O5P6Q7R8S
local job = tostring(args[2])
https://pan.baidu.com/s/8I9J0K1L2M3N4O5P6Q7R
local grade = tonumber(args[3])
https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
local sgrade = tostring(args[3])
https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
local jobInfo = QBCore.Shared.Jobs[job]
https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
if jobInfo then
https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
if jobInfo["grades"][sgrade] then
https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K
Player.Functions.SetJob(job, grade)
https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
exports['qb-phone']:hireUser(job, Player.PlayerData.citizenid, grade)
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
else
https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
TriggerClientEvent('QBCore:Notify', source, "等级无效", 'error')
https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
end
https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
else
https://pan.baidu.com/s/2C3D4E5F6G7H8I9J0K1L?pwd=wxy6
TriggerClientEvent('QBCore:Notify', source, "职业无效", 'error')
https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G?pwd=hij1
end
https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
else
https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
end
https://pan.baidu.com/s/5X6Y7Z8A9B0C1D2E3F4G
end, 'admin')
https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
添加移除职业命令:
https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
在同一文件下,添加新的 removejob 命令:
https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V
月亮
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
https://pan.baidu.com/s/5P6Q7R8S9T0U1V2W3X4Y
QBCore.Commands.Add('removejob', '移除玩家的职业(仅管理员)', { { name = 'id', help = '玩家 ID' }, { name = 'job', help = '职业名称' } }, true, function(source, args)
https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
if Player then
https://pan.baidu.com/s/9S1T2U3V4W5X6Y7Z8A9B
if Player.PlayerData.job.name == tostring(args[2]) then
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W
Player.Functions.SetJob("unemployed", 0)
不要乱来哦
end
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=ijkl
exports['qb-phone']:fireUser(tostring(args[2]), Player.PlayerData.citizenid)
https://pan.baidu.com/s/7Y8Z9A0B1C2D3E4F5G6H?pwd=klm2
else
https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
https://pan.baidu.com/s/4V5W6X7Y8Z9A0B1C2D3E
end
https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
end, 'admin')
https://pan.baidu.com/s/2D3E4F5G6H7I8J9K0L1M
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
https://pan.baidu.com/s/9Q0R1S2T3U4V5W6X7Y8Z?pwd=mnop
https://pan.baidu.com/s/1L2M3N4O5P6Q7R8S9T0U
更新 qb-cityhall 脚本:
https://pan.baidu.com/s/2D3E4F5G6H7I8J9K0L1M
https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
如果使用 qb-cityhall,请在 qb-cityhall/server/main.lua 文件中找到 ApplyJob 函数,并替换为以下代码:
https://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4
月亮
https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
https://pan.baidu.com/s/6H7I8J9K0L1M2N3O4P5Q
RegisterNetEvent('qb-cityhall:server:ApplyJob', function(job, cityhallCoords)
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y?pwd=klm3
local src = source
https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
local Player = QBCore.Functions.GetPlayer(src)
https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G?pwd=hij1
if not Player then return end
https://pan.baidu.com/s/8A9B0C1D2E3F4G5H6I7J
local ped = GetPlayerPed(src)
https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
local pedCoords = GetEntityCoords(ped)
https://pan.baidu.com/s/8J9K0L1M2N3O4P5Q6R7S
local JobInfo = QBCore.Shared.Jobs[job]
https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
if #(pedCoords - cityhallCoords) >= 20.0 or not availableJobs[job] then
https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
return DropPlayer(source, "尝试利用漏洞")
https://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q
end
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd
Player.Functions.SetJob(job, 0)
https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U
exports['qb-phone']:hireUser(job, Player.PlayerData.citizenid, 0)
https://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
TriggerClientEvent('QBCore:Notify', src, Lang:t('info.new_job', {job = JobInfo.label}))
https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
end)
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M
https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U?pwd=yza9
添加声音文件:
https://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W?pwd=efg1
将 dialing.ogg 文件放入 interact-sound/client/html/sounds 文件夹中(如果该文件夹不存在则创建)。
https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0
重启服务器:
https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
完全重启服务器以使新命令和手机功能生效。
https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K
https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
赌场设置
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
更新配置文件:
https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
打开 qb-core/config.lua 文件,将以下代码替换为新代码:
https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R
https://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X
月亮
https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
https://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr
-- 旧版
https://pan.baidu.com/s/6H7I8J9K0L1M2N3O4P5Q
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0 } -- 类型 = 起始金额 - 添加或移除服务器上的货币类型(例如 blackmoney = 0),添加后不会从数据库中删除!
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=uvwx
QBConfig.Money.DontAllowMinus = { 'cash', 'crypto' } -- 不允许出现负数的货币
https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
https://pan.baidu.com/s/5O7P8Q9R0S1T2U3V4W5X
-- 新版
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, casino = 0 } -- 类型 = 起始金额 - 添加或移除服务器上的货币类型(例如 blackmoney = 0),添加后不会从数据库中删除!
https://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
QBConfig.Money.DontAllowMinus = { 'cash', 'casino' } -- 不允许出现负数的货币
https://pan.baidu.com/s/8P9Q0R1S2T3U4V5W6X7Y?pwd=ijkl
哈哈
加密货币设置
https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y
更新玩家数据:
你好啊
打开 qb-core/server/Player.lua 文件,将以下代码粘贴到 metadata 中(如果你不确定 metadata 是什么,它看起来像 PlayerData.metadata['inside']):
https://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
https://pan.baidu.com/s/8I9J0K1L2M3N4O5P6Q7R
月亮
https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V
https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N
PlayerData.metadata['crypto'] = PlayerData.metadata['crypto'] or {
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
["shung"] = 0,
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
["gne"] = 0,
https://pan.baidu.com/s/5P6Q7R8S9T0U1V2W3X4Y
["xcoin"] = 0,
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y
["lme"] = 0
https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
}
收起
https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7