You can just use :
AddEventHandler("playerSpawned", function()
Citizen.CreateThread(function()
local player = PlayerId()
local playerPed = GetPlayerPed(-1)
-- Enable pvp
NetworkSetFriendlyFireOption(true)
SetCanAttackFriendly(playerPed, true, true)
end)
end)
6 Likes
Bennett
3
where us this added too? server config?
2 Likes
Bennett
4
jk, i didnt read it right. disregard.
This code is already on main.lua you just need to activate him.
MiK17
6
Can you tell me which script?
Regards,
MiK
if you use essentialmode you can enable it there. If not the script is above. put it into a client file, create a resoursefile and bam done.
MiK17
8
Alright man, I apreciate it, I was trying to not make a separate addon to lower the amount of files and folders ehehe, Thanks
Best Regards,
MiK
I do not quite understand the purpose of scripting normally if you enable pvp true in the essentialmode. .init file it’s ok … 
1 Like
@SuisseGames Not everyone uses essentialmode…??