Introduces toggle option for PVP

This commit is contained in:
Mitroxs
2021-12-01 20:04:07 +01:00
parent bb8e73827a
commit 8f0e4438b6
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -4,8 +4,10 @@
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
ShutdownLoadingScreenNui()
LocalPlayer.state:set('isLoggedIn', true, false)
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
if QBConfig.Server.pvp then
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
end
end)
RegisterNetEvent('QBCore:Client:OnPlayerUnload', function()
+1
View File
@@ -31,6 +31,7 @@ QBConfig.Server.closed = false -- Set server closed (no one can join except peop
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.pvp = true
QBConfig.Server.discord = "" -- Discord invite link
QBConfig.Server.PermissionList = {} -- permission list