mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
More changes
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ QBConfig.Server.WhitelistPermission = 'admin' -- Permission that's able to enter
|
||||
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 = {'admin', 'mod'} -- Add as many groups as you want here after creating them in your server.cfg
|
||||
QBConfig.Server.Permissions = {'god', 'admin', 'mod'} -- Add as many groups as you want here after creating them in your server.cfg
|
||||
|
||||
QBConfig.Notify = {}
|
||||
|
||||
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
QBCore.Commands = {}
|
||||
QBCore.Commands.List = {}
|
||||
QBCore.Commands.IgnoreList = { -- Ignore old perm levels while keeping backwards compatibility
|
||||
['god'] = true, -- We don't need to create an ace because group.admin allows all commands
|
||||
['admin'] = true, -- We don't need to create an ace because group.admin allows all commands
|
||||
['god'] = true, -- We don't need to create an ace because group.god allows all commands
|
||||
['user'] = true -- We don't need to create an ace because builtin.everyone
|
||||
}
|
||||
|
||||
|
||||
+13
-21
@@ -309,28 +309,20 @@ end
|
||||
|
||||
-- Opt in or out of admin reports
|
||||
|
||||
-- function QBCore.Functions.IsOptin(source)
|
||||
-- local license = QBCore.Functions.GetIdentifier(source, 'license')
|
||||
-- if not license or not QBCore.Functions.HasPermission(source, 'admin') then return false end
|
||||
-- if QBCore.Config.Server.UseOldPermissionSystem then
|
||||
-- return QBCore.Config.Server.PermissionList[license].optin
|
||||
-- else
|
||||
-- local Player = QBCore.Functions.GetPlayer(source)
|
||||
-- return Player.PlayerData.optin
|
||||
-- end
|
||||
-- end
|
||||
function QBCore.Functions.IsOptin(source)
|
||||
local license = QBCore.Functions.GetIdentifier(source, 'license')
|
||||
if not license or not QBCore.Functions.HasPermission(source, 'admin') then return false end
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
return Player.PlayerData.optin
|
||||
end
|
||||
|
||||
-- function QBCore.Functions.ToggleOptin(source)
|
||||
-- local license = QBCore.Functions.GetIdentifier(source, 'license')
|
||||
-- if not license or not QBCore.Functions.HasPermission(source, 'admin') then return end
|
||||
-- if QBCore.Config.Server.UseOldPermissionSystem then
|
||||
-- QBCore.Config.Server.PermissionList[license].optin = not QBCore.Config.Server.PermissionList[license].optin
|
||||
-- else
|
||||
-- local Player = QBCore.Functions.GetPlayer(source)
|
||||
-- Player.PlayerData.optin = not Player.PlayerData.optin
|
||||
-- Player.Functions.SetMetaData('optin', Player.PlayerData.optin)
|
||||
-- end
|
||||
-- end
|
||||
function QBCore.Functions.ToggleOptin(source)
|
||||
local license = QBCore.Functions.GetIdentifier(source, 'license')
|
||||
if not license or not QBCore.Functions.HasPermission(source, 'admin') then return end
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
Player.PlayerData.optin = not Player.PlayerData.optin
|
||||
Player.Functions.SetMetaData('optin', Player.PlayerData.optin)
|
||||
end
|
||||
|
||||
-- Check if player is banned
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData)
|
||||
PlayerData.name = GetPlayerName(source)
|
||||
PlayerData.cid = PlayerData.cid or 1
|
||||
PlayerData.money = PlayerData.money or {}
|
||||
PlayerData.optin = PlayerData.optin or true
|
||||
for moneytype, startamount in pairs(QBCore.Config.Money.MoneyTypes) do
|
||||
PlayerData.money[moneytype] = PlayerData.money[moneytype] or startamount
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user