I have an issue in my newest version ESX server that players are not able to shoot eachother. I am not sure if a certain resource is doing this but I have pretty much checked every resource of;
SetCanAttackFriendly()
NetworkSetFriendlyFireOption()
but no progress so far.
One thing I have noticed is that this only happens if player has just joined the server and hasn’t died. If I kill and revive a player, then I am able to shoot the player.
I am also using current script:
AddEventHandler("playerSpawned", function()
Citizen.CreateThread(function()
local player = PlayerId()
local playerPed = GetPlayerPed(-1)
-- Enable pvp
NetworkSetFriendlyFireOption(true)
SetCanAttackFriendly(playerPed, true, true)
end)
end)
but no results.
This is an active server with an active playerbase, getting the pvp to work fully is crucial to me, as it is currently upsetting many players. Thank you fellow developers in advance.