Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

FiveM has no universal sv_pvp or equivalent server.cfg switch. Player-versus-player damage is normally decided by the resource that controls gameplay—often vMenu, an RP framework, a safe-zone script, or a weapon/moderation resource. Enable PvP in that controller first. If no existing resource exposes a setting, add a small client resource that calls NetworkSetFriendlyFireOption(true) and SetCanAttackFriendly(PlayerPedId(), true, false), then load it with ensure in server.cfg.

For hosting this kind of setup, Godlike.Host provides FiveM game-server hosting with a Pterodactyl-based game panel, SFTP/FTP access, and a personal firewall for player access and IP filtering. It is not on Cfx.re’s list of authorized FiveM hosts (fivem.net, 10 Oct 2026).

OneSync is separate: it improves entity synchronization and routing, but it does not turn friendly fire on. A reliable test requires two players outside safe zones, with godmode, invincibility, routing-bucket isolation, and framework restrictions disabled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What actually controls PvP in FiveM?

FiveM exposes GTA V natives to client and server resources rather than providing one universal combat convar. The official server-command list does not define a global PvP toggle. In practice, a resource decides whether a player can attack another player and whether incoming damage is accepted.

#1 Best Overall
CyberPowerPC Gaming PC, AMD Ryzen 5 5500, Radeon RX 6500 XT 4GB | Gamer Master, 8GB DDR4, 500GB PCIe 4.0 SSD, WiFi Ready & Windows 11 Home (GMA3100A3)
  • System: AMD Ryzen 5 5500 3.6GHz 6 Cores | AMD B550 Chipset | 8GB DDR4 | 500GB PCIe 4.0 NVMe SSD | Windows 11 Home
  • Graphics: AMD Radeon RX 6500 XT 4GB Graphics | 1x HDMI | 1x DisplayPort
  • Connectivity: 4 x USB-A 3.2 | 4 x USB-A 2.0 | 1 x LAN | WiFi 5 | Bluetooth 5.0 | 7.1 Channel Audio
  • Tempered Side Case Panel | Custom RGB Lighting | Keyboard and Mouse
  • 1 Year Parts & Labor Warranty, Free Lifetime Tech Support

The controller may be a menu resource such as vMenu, your roleplay framework, a safe-zone package, a weapon-restriction script, an admin/godmode resource, or a custom combat script. Several resources can run at once, so enabling friendly fire in one resource does not help if another resource turns it off on every tick or after every respawn.

What the two relevant natives do

  • NetworkSetFriendlyFireOption(true) enables the network friendly-fire option for the client.
  • SetCanAttackFriendly(PlayerPedId(), true, false) allows the current player ped to attack friendly players. The ped must be refreshed when the character changes.

These are client-side gameplay functions. They are a practical fallback when your existing gameplay resource has no PvP setting, but they do not replace rules for safe zones, jobs, teams, moderation, or damage auditing.

Choose the right implementation

Approach When to use it Persistence and control Trade-off
Existing vMenu setting vMenu is already installed and controls player permissions or gameplay. Usually persists while vMenu applies its setting; permission and menu configuration remain in one place. Another resource can still override it, and the exact label depends on the installed vMenu version.
Framework setting Your RP framework owns character loading, teams, weapons, or combat rules. Can follow framework login, spawn, job, and death events. Framework updates may change configuration keys or lifecycle events.
Custom client resource No installed resource exposes friendly-fire control. You choose when to apply the natives and can reapply them after spawn. It can conflict with safe zones and must be maintained alongside other resources.
OneSync configuration You need better entity awareness, routing, and synchronization. Changes networking behavior, not the combat permission itself. It does not solve a disabled-friendly-fire setting.

Prefer the first applicable row. A custom script should be the fallback, not an automatic replacement for a framework’s combat policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 1: Find the resource that is disabling damage

Before writing code, identify which resource currently owns combat. Search your resource folders and configuration for terms such as friendly, pvp, safezone, godmode, invincible, weapon, attack, and damage. Check both Lua files and configuration files.

Check vMenu and framework permissions

Community troubleshooting commonly points to vMenu when players can see one another but cannot cause damage. Open the vMenu configuration and permissions files used by your server and look for player options that disable PvP, godmode, or weapons. Verify that ordinary players are not inheriting an administrator or safe-mode permission set.

For an RP framework, inspect the character-load and player-state code. Frameworks often apply invincibility during login, hospital states, job selection, or respawn. A setting that looks like a PvP problem may actually be a temporary state that is never cleared.

Check safe zones, buckets, and moderation scripts

  • Safe-zone resources: may disable attacks only inside configured coordinates or interiors.
  • Routing buckets: isolate players in separate instances; isolated players cannot interact like players in the same world.
  • Godmode or moderation tools: can block incoming damage while leaving outgoing weapon effects visible.
  • Weapon scripts: may remove weapons, cancel damage events, or restrict damage by job, team, or zone.

Resource start order matters. If your script runs first and a later resource resets friendly fire, the later resource wins. Record the resources that touch player state and test them individually rather than adding several competing toggles.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
WIWB Gaming PC Desktop, GeForce RTX 3050 8GB GDDR6, AMD Ryzen 7 4700LE
  • 8-Core 16-Thread Processing Power – Powered by the Ryzen 7 4700LE processor with Zen 2 architecture, delivering 8 cores and 16 threads with a boost clock up to 4.2GHz. Effortlessly handle multitasking, streaming, content creation, and demanding applications simultaneously without slowdowns.
  • GeForce RTX 3050 8GB Graphics – Equipped with 8GB GDDR6 dedicated VRAM and real-time ray tracing support. Experience smooth 1080p gaming at 55-60 FPS in AAA titles like Cyberpunk 2077, 70+ FPS in Fortnite, and 90-100 FPS in Apex Legends with DLSS enabled. The 8GB buffer handles modern game textures comfortably – a step above 6GB variants
  • High-Speed Memory & Storage – Paired with 16GB of DDR4 3200MHz dual-channel RAM (16GB), the PC ensures responsive multitasking—whether streaming while gaming or editing videos. It also includes a 512 GB NVMe M.2 SSD for lightning-fast boot times, quick game loads, and ample storage for your game library, creative projects, and files.
  • Next-Gen WiFi 6 Connectivity – Stay connected with the latest WiFi 6 technology for faster speeds, lower latency, and improved network efficiency. Whether you're gaming online, streaming 4K content, or joining video conferences, enjoy stable, high-speed wireless connectivity.
  • Ready-to-Use Value Desktop – Pre-built and ready to go right out of the box. Perfect for gamers, students, content creators, and home office users seeking reliable performance without the hassle of building a PC themselves. The mature AM4 platform with DDR4 memory offers excellent value and proven stability.

Step 2: Enable PvP in the existing controller

If vMenu or your framework already has a PvP/friendly-fire option, use that option instead of a second script. The exact menu wording and permission names vary by installed version, so do not copy a setting from an unrelated release without checking its current configuration.

  1. Stop the server or use the resource-management method appropriate for your deployment.
  2. Open the active vMenu or framework configuration and locate its PvP, friendly-fire, damage, safe-zone, or player-protection setting.
  3. Enable player attacks and remove any default godmode or invincibility state for the test group.
  4. Check that the setting applies after character selection and respawn, not only when the resource starts.
  5. Restart the resource or server, then test with two connected players in the same world.

If the setting works until another resource starts, compare start order and temporarily stop the suspected resource. Do not leave both resources writing contradictory values every frame.

Step 3: Create a fallback client resource

Use this method only when no existing controller provides the behavior you need. A FiveM resource needs a folder, an fxmanifest.lua, and a client script. The example below applies friendly fire when the resource starts and keeps it applied once per second. A framework lifecycle hook is preferable when one is available.

Create the resource files

Create a folder such as resources/[local]/pvp_enable. Add this manifest:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
fx_version 'cerulean'
game 'gta5'

client_script 'client.lua'

The manifest declares that client.lua runs on each player client. Keep the native calls in a client script because they control the player-facing gameplay state.

Add the client logic

CreateThread(function()
    while true do
        Wait(1000)

        local ped = PlayerPedId()
        if DoesEntityExist(ped) then
            NetworkSetFriendlyFireOption(true)
            SetCanAttackFriendly(ped, true, false)
        end
    end
end)

The one-second interval is a simple implementation pattern, not a guarantee that it will override every other resource. If a safe-zone script must disable PvP in a particular area, do not blindly run this loop there; coordinate the two resources or make the loop conditional on the same zone state.

Reapply after spawn or character load

Some frameworks replace the player ped during spawn, death, or character selection. In that case, apply the natives from the framework’s documented player-loaded or spawn event as well as on resource start. If no event is available, a short polling loop can detect a changed ped and reapply the settings:

Rank #3
msi Codex Z2 Gaming Desktop, AMD R7-8700F, RTX 5070, 32GB DDR5, 2TB SSD | NVIDIA GeForce RTX 5070, USB Type-C, VR-Ready, Windows 11 Home. Model A8NVP-436US
  • POWERHOUSE 8-CORE GAMING PERFORMANCE — Driven by the AMD Ryzen 7 8700F with 8 cores and 16 threads, boosting up to 5.0 GHz for smooth, responsive gameplay and the ability to handle AAA titles, streaming, and background tasks all at once
  • NEXT-GEN BLACKWELL ARCHITECTURE — The NVIDIA GeForce RTX 5070 is powered by NVIDIA's cutting-edge Blackwell GPU architecture, delivering a massive generational leap in rasterization and ray tracing performance so you can experience your games the way they were meant to be played.
  • Simplistic Design: Enjoy the latest generation of Windows 11 Home for your everyday needs. *MSI recommends Windows 11 Pro for business use.
  • Cool While Gaming: In conjunction with an ARGB fan Air Cooler, the Codex R2 features four system cooling fans; three in the front and one in the rear to pull in cool air and push heat out of the PC.
  • Turn on the Bright Lights: With the built-in RGB lighting, take your gaming experience to the next level by pressing the MSI LED button to cycle through lighting options. Customize lighting even further with MSI Center software.
local lastPed = 0

CreateThread(function()
    while true do
        Wait(500)

        local ped = PlayerPedId()
        if DoesEntityExist(ped) and ped ~= lastPed then
            lastPed = ped
            NetworkSetFriendlyFireOption(true)
            SetCanAttackFriendly(ped, true, false)
        end
    end
end)

Check the current FiveM native reference before production deployment; native signatures and resource behavior can change with platform updates. Avoid adding both examples to the same resource, since they perform the same job.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 4: Load the resource in server.cfg

Place the resource under a directory that the server scans as its resources path, then add an ensure line:

ensure pvp_enable
  1. Confirm the folder name exactly matches the name after ensure.
  2. Confirm fxmanifest.lua is in that folder’s top level.
  3. Confirm the manifest names the client script correctly.
  4. Put the ensure line after any dependency that must finish first.
  5. Restart the resource or the server and inspect the console for manifest or script errors.

If another resource must override the fallback in safe zones, decide the ownership rule explicitly. Starting your script later may make it win globally, but that can destroy the zone resource’s intended protection. Conditional logic or framework hooks are safer than relying only on start order.

Do you need OneSync for PvP?

No. OneSync is not a friendly-fire switch. It is Cfx.re’s synchronization system for entity awareness and server-determined routing. The on, off, and legacy modes affect how entities and players are synchronized; they do not decide whether one player is allowed to damage another.

Use the mode appropriate for your server’s population and synchronization requirements. A server can have OneSync enabled and still have PvP disabled by vMenu, a framework, a safe-zone script, or godmode. Conversely, enabling friendly fire does not fix players who are separated into different routing buckets or otherwise not synchronized into the same scene.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test PvP without false results

Use two real player connections, not only a local menu preview. Perform the test in an ordinary shared area, away from interiors and configured safe zones.

  1. Have both players select characters and finish all loading or spawn screens.
  2. Verify they are in the same routing bucket or instance.
  3. Disable godmode, invincibility, admin protection, and framework injury immunity for the test characters.
  4. Confirm both players possess the same test weapon type and that a weapon script has not restricted it.
  5. Fire one controlled shot, then test a second weapon or vehicle impact to distinguish a weapon restriction from a global damage block.
  6. Repeat after each player respawns or changes character.
  7. Enter a configured safe zone and confirm its intended behavior separately; a safe zone allowing no damage is not evidence that global PvP failed.

Keep a short log of which resource was running, the players’ bucket IDs, their protection state, and whether the result changed after respawn. This makes intermittent overrides easier to locate.

Rank #4
KOTIN Prebuilt Gaming PC RTX 5070 12GB, Ryzen 7 9700X, 32GB DDR5, 1TB SSD | 11.3in Smart Display, 850W 80+ Gold PSU, 360mm Liquid Cooler, WiFi 7, 1440p 4K ARGB Windows 11 Gaming Desktop Computer
  • POWERED BY RTX 5070 12GB + RYZEN 7 9700X - The GeForce RTX 5070 12GB GDDR7 graphics card pairs with an 8-core AMD Ryzen 7 9700X processor to drive smooth 1440p and 4K gameplay, giving this gaming PC the headroom for modern titles, streaming, and creative work.
  • 32GB DDR5 6000MHz MEMORY & 1TB NVMe SSD - 32GB of high-speed DDR5 memory and a 1TB PCIe 4.0 NVMe solid state drive deliver quick load times, smooth multitasking, and generous storage, keeping this prebuilt gaming desktop responsive under heavy workloads.
  • BUILT-IN 11.3-INCH Smart DISPLAY - An integrated smart screen shows real-time CPU and GPU temperatures, usage, and weather while you play, adding a distinctive and functional touch to your battlestation.
  • 850W 80+ GOLD POWER SUPPLY, 360MM LIQUID COOLING & WiFi 7 - An 850W 80 Plus Gold certified power supply provides stable, efficient power with headroom for future upgrades, while a 360mm AIO liquid cooler, WiFi 7, and an ARGB mid-tower case keep the Ryzen 7 CPU cool and connected in a clean build.
  • READY TO PLAY OUT OF THE BOX - Arrives fully assembled and tested with Windows 11 Home pre-installed, so your prebuilt gaming computer is ready to set up in minutes. Assembled in the USA, and backed by a one-year limited warranty and lifetime free technical support.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting by symptom

Symptom Likely cause What to check
Neither player can damage the other anywhere Global PvP/friendly fire is disabled, or both players have protection. vMenu/framework PvP setting, godmode, invincibility, weapon restrictions, and the client console for script errors.
Damage works in one place but not another Safe-zone logic, interior rules, or routing buckets. Zone coordinates, interior/instance configuration, and bucket assignment.
Damage works until a respawn The framework created a new ped or reapplied invincibility. Character-loaded/spawn events and reapplication of both natives after the new ped exists.
The fallback resource appears not to run Incorrect path, manifest, script name, or missing ensure. Folder name, top-level manifest, client-script declaration, server console, and resource list.
The fallback works briefly, then stops A later or continuously running resource resets friendly fire. Start order and scripts containing friendly-fire, godmode, damage, or safe-zone calls; stop suspects one at a time.
Players can see each other but cannot interact Different routing buckets or synchronization scope. Bucket assignment and OneSync/entity-routing configuration, not just the PvP toggle.

Compatibility and maintenance considerations

Respect roleplay rules

Global friendly fire is appropriate for deathmatch or unrestricted combat, but many RP servers need protected jobs, hospitals, spawn areas, and faction rules. In those cases, let the framework or zone resource make the allow/deny decision and use the natives only as a default outside protected areas.

Avoid competing polling loops

Two scripts that repeatedly call opposite values create timing-dependent behavior and make debugging difficult. Establish one owner for the global default and expose events or exports for temporary exceptions. If you inherit a server with several combat resources, disable duplicate loops before adding a new one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review updates

After a FiveM artifact, framework, vMenu, or character-system update, retest initial spawn, respawn, character switching, safe zones, and bucket transfers. Native behavior should be checked against the current FiveM documentation, and framework lifecycle event names should be verified against that framework’s release.

Quick deployment checklist

  • No universal sv_pvp setting is being assumed.
  • The active gameplay controller has been identified.
  • vMenu, framework, safe-zone, weapon, and godmode settings have been checked.
  • Any fallback resource has a valid fxmanifest.lua and client script.
  • ensure pvp_enable appears in server.cfg with correct ordering.
  • Friendly fire is reapplied after the framework creates a new player ped.
  • OneSync is configured for synchronization needs, not treated as the PvP switch.
  • Two players have tested weapons outside safe zones and after respawning.

Frequently Asked Questions

What setting turns friendly fire on in FiveM?

There is no universal server.cfg setting. Enable PvP in the resource that controls combat, or use a client resource calling NetworkSetFriendlyFireOption(true) and SetCanAttackFriendly(PlayerPedId(), true, false).

Why can’t players damage each other even though they can see each other?

Check vMenu or framework PvP settings, godmode, invincibility, weapon restrictions, safe zones, and routing buckets. A later resource may also be resetting friendly fire.

Do I need OneSync to enable PvP?

No. OneSync handles synchronization and entity routing. It does not enable friendly fire, although incorrect routing buckets can prevent players from interacting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why does PvP stop after respawn?

Respawn often creates a new player ped or reapplies protection. Reapply the friendly-fire natives from the framework’s spawn/character-loaded event or after detecting the new ped.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.