-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tweak(gamestate/server): allow blocking of ScriptEntityStateChangeEvent #2556
tweak(gamestate/server): allow blocking of ScriptEntityStateChangeEvent #2556
Conversation
code/components/citizen-server-impl/src/state/ServerGameState.cpp
Outdated
Show resolved
Hide resolved
53640ec
to
6fc9b0f
Compare
Under no circumstances should we be blocking events outright when there is the potential for legitimate use cases. That would also be a compatbility break. |
6fc9b0f
to
f9895c5
Compare
f9895c5
to
534d698
Compare
Right, I didn't think about potential valid use cases or breaking backwards compatibility. I am aware that providing an event handler for the parsed event data is no longer really appreciated, but I didn't feel confident providing a single ConVar for blocking this event, as this is used on a lot of network stuff and several state types are abusable (but not all). |
In case anyone wants to review this, I created a resource to trigger every state change type: Command is (This ofc needs two online players to work + script assumes population is deactivated.) |
@gottfriedleibniz Hello, is there a date for this fix to go into production, a lot of hacks are using this flaw? |
534d698
to
b3b2a0f
Compare
This introduces a new ConVar called 'sv_enableNetworkedScriptEntityStates' that allows blocking of the 'SCRIPT_ENTITY_STATE_CHANGE_EVENT' game event (routing is enabled by default).
b3b2a0f
to
6c977fa
Compare
As discussed, this now allows to block routing of the game event with a ConVar. Tested with the script resource provided above. |
Goal of this PR
How is this PR achieving the goal
Introducing a new ConVar called 'sv_enableNetworkedScriptEntityStates' that allows blocking of the 'SCRIPT_ENTITY_STATE_CHANGE_EVENT' game event (routing is enabled by default).
This PR applies to the following area(s)
FiveM, RedM, Server
Successfully tested on
Game builds: 2699
Platforms: Windows
Checklist
Fixes issues
fixes #2553