I created a fivem server so I could play online with mods with my friend, but ingame I’m unable to harm any real player. I can cause damage to other entities, but I’m unable to shot a bullet at an online player when I am over them. Does anyone know how I can fix this issue.
You could use this, or take it and turn it into something more
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
for i = 0,63 do
if NetworkIsPlayerConnected(i) then
if GetPlayerPed(i) ~= nil then
SetCanAttackFriendly(GetPlayerPed(i), true, true)
NetworkSetFriendlyFireOption(true)
end
end
end
end
end)
Thanks your script got it working