QBConfig = {}
QBConfig.MaxPlayers = GetConvarInt('sv_maxclients', 48) -- 从配置文件中获取最大玩家数,默认为 48
QBConfig.DefaultSpawn = vector4(-1035.71, -2731.87, 12.86, 0.0)
QBConfig.UpdateInterval = 5 -- 在几分钟内更新玩家数据的频率
QBConfig.StatusInterval = 5000 -- 多久检查一次饥饿/口渴状态(以毫秒为单位)
QBConfig.Money = {}
QBConfig.Money.MoneyTypes = { cash = 500, bank = 5000, crypto = 0 } -- type = startamount - 为您的服务器添加或删除货币类型(例如 blackmoney = 0),请记住,一旦添加,它不会从数据库中删除!
QBConfig.Money.DontAllowMinus = { 'cash', 'crypto' } -- 不允许进去的钱减去
QBConfig.Money.MinusLimit = -5000 -- 您可以为负数的最大金额
QBConfig.Money.PayCheckTimeOut = 1000 -- 它给薪水的时间(以分钟为单位)
QBConfig.Money.PayCheckSociety = false -- 如果真正的薪水来自玩家所在的社会账户,则需要 qb 管理
QBConfig.Player = {}
QBConfig.Player.HungerRate = 0.1 -- 饥饿度下降的速度。
QBConfig.Player.ThirstRate = 0.1 -- 口渴下降的速度。
QBConfig.Player.Bloodtypes = {
'A+', 'A-', 'B+', 'B-', 'AB+', 'AB-', 'O+', 'O-',
}
QBConfig.Player.PlayerDefaults = {
citizenid = function() return QBCore.Player.CreateCitizenId() end,
cid = 1,
money = function()
local moneyDefaults = {}
for moneytype, startamount in pairs(QBConfig.Money.MoneyTypes) do
moneyDefaults[moneytype] = startamount
end
return moneyDefaults
end,
optin = true,
charinfo = {
firstname = 'Firstname',
lastname = 'Lastname',
birthdate = '00-00-0000',
gender = 0,
nationality = 'USA',
phone = function() return QBCore.Functions.CreatePhoneNumber() end,
account = function() return QBCore.Functions.CreateAccountNumber() end
},
job = {
name = 'unemployed',
label = 'Civilian',
payment = 10,
type = 'none',
onduty = false,
isboss = false,
grade = {
name = 'Freelancer',
level = 0
}
},
gang = {
name = 'none',
label = 'No Gang Affiliation',
isboss = false,
grade = {
name = 'none',
level = 0
}
},
metadata = {
hunger = 100,
thirst = 100,
stress = 0,
isdead = false,
inlaststand = false,
armor = 0,
ishandcuffed = false,
tracker = false,
injail = 0,
jailitems = {},
status = {},
phone = {},
rep = {},
currentapartment = nil,
callsign = 'NO CALLSIGN',
bloodtype = function() return QBConfig.Player.Bloodtypes[math.random(1, #QBConfig.Player.Bloodtypes)] end,
fingerprint = function() return QBCore.Player.CreateFingerId() end,
walletid = function() return QBCore.Player.CreateWalletId() end,
criminalrecord = {
hasRecord = false,
date = nil
},
licences = {
driver = true,
business = false,
weapon = false
},
inside = {
house = nil,
apartment = {
apartmentType = nil,
apartmentId = nil,
}
},
phonedata = {
SerialNumber = function() return QBCore.Player.CreateSerialNumber() end,
InstalledApps = {}
}
},
position = QBConfig.DefaultSpawn,
items = {},
}
QBConfig.Server = {} -- General server config
QBConfig.Server.Closed = false -- Set server closed (no one can join except people with ace permission 'qbadmin.join')
QBConfig.Server.ClosedReason = 'Server Closed' -- Reason message to display when people can't join the server
QBConfig.Server.Uptime = 0 -- Time the server has been up.
QBConfig.Server.Whitelist = false -- Enable or disable whitelist on the server
QBConfig.Server.WhitelistPermission = 'admin' -- Permission that's able to enter the server when the whitelist is on
QBConfig.Server.PVP = true -- Enable or disable pvp on the server (Ability to shoot other players)
QBConfig.Server.Discord = '' -- Discord invite link
QBConfig.Server.CheckDuplicateLicense = true -- Check for duplicate rockstar license on join
QBConfig.Server.Permissions = { 'god', 'admin', 'mod' } -- Add as many groups as you want here after creating them in your server.cfg
QBConfig.Commands = {} -- Command Configuration
QBConfig.Commands.OOCColor = { 255, 151, 133 } -- RGB color code for the OOC command
QBConfig.Notify = {}
QBConfig.Notify.NotificationStyling = {
group = false, -- Allow notifications to stack with a badge instead of repeating
position = 'right', -- top-left | top-right | bottom-left | bottom-right | top | bottom | left | right | center
progress = true -- Display Progress Bar
}
-- These are how you define different notification variants
-- The "color" key is background of the notification
-- The "icon" key is the css-icon code, this project uses `Material Icons` & `Font Awesome`
QBConfig.Notify.VariantDefinitions = {
success = {
classes = 'success',
icon = 'check_circle'
},
primary = {
classes = 'primary',
icon = 'notifications'
},
warning = {
classes = 'warning',
icon = 'warning'
},
error = {
classes = 'error',
icon = 'error'
},
police = {
classes = 'police',
icon = 'local_police'
},
ambulance = {
classes = 'ambulance',
icon = 'fas fa-ambulance'
}
}
改哪个
|