Skip to content

feat(gta-core-five): disable passive mode using convar#4076

Open
divocbn wants to merge 2 commits into
citizenfx:masterfrom
divocbn:feat/block-passive-mode
Open

feat(gta-core-five): disable passive mode using convar#4076
divocbn wants to merge 2 commits into
citizenfx:masterfrom
divocbn:feat/block-passive-mode

Conversation

@divocbn

@divocbn divocbn commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Goal of this PR

Preventing abuse of the GTA:O friendly / passive mode sync which is being actively exploited and implemented in almost every cheat.

How is this PR achieving the goal

Patch out the TreatAsFriendlyForTargetingAndDamage check inside CPed::IsAllowedToDamageEntity when the game_disablePassiveMode convar is enabled.

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 3258
Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Cheats abusing passive mode: https://www.youtube.com/watch?v=IXXxhkDEt6A

@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Jul 16, 2026
@william-des

Copy link
Copy Markdown
Contributor

I think it would be more flexible to expose a native similar to OnesyncEnableRemoteAttachmentSanitization
For example, on my PvP server I use passive mode for teammates in certain game modes, but not all of them. I will not be able to use a global server set convar in this case.

It could also be useful to have a native that ignores passive mode for a specific player ped instead of applying it globally, if that's not too much complexity to add.

@AngeloneISL

AngeloneISL commented Jul 16, 2026

Copy link
Copy Markdown

I think it would be more flexible to expose a native similar to OnesyncEnableRemoteAttachmentSanitization For example, on my PvP server I use passive mode for teammates in certain game modes, but not all of them. I will not be able to use a global server set convar in this case.

It could also be useful to have a native that ignores passive mode for a specific player ped instead of applying it globally, if that's not too much complexity to add.

Agreed same here

@divocbn

divocbn commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

I think it would be more flexible to expose a native similar to OnesyncEnableRemoteAttachmentSanitization For example, on my PvP server I use passive mode for teammates in certain game modes, but not all of them. I will not be able to use a global server set convar in this case.

It could also be useful to have a native that ignores passive mode for a specific player ped instead of applying it globally, if that's not too much complexity to add.

iirc when I asked about implementing that I got told to rather do it as a ConVar instead of a native, maybe @radium-cfxcan clarify whether to expose it as native or convar

@Bossman02

Copy link
Copy Markdown

And couldn't both be implemented, with convar taking prevalence over the native method? That way, servers that want to block it entirely can do so using convar, and those that want to block it temporarily via a script can use the native method

@xalva98

xalva98 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

And couldn't both be implemented, with convar taking prevalence over the native method? That way, servers that want to block it entirely can do so using convar, and those that want to block it temporarily via a script can use the native method

New natives will not be added currently because it would mean double work for Gen9 (enhanced) if i understood it correctly.
My best guess is they want to have Enhanced "feature complete" before adding anything on top, making it 1 to 1 as legacy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants