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()