Skip to content
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

feat(server): parse NETWORK_PLAY_SOUND_EVENT #1316

Conversation

william-des
Copy link
Contributor

This adds parsing for NETWORK_PLAY_SOUND_EVENT.

Since a few days some cheaters are spamming networked sounds using PlaySoundFromCoord and/or PlaySoundFromEntity natives on my servers.
This would provide the ability to filter wich sounds are allowed base on the sound name hash etc..

Tested on 2372 and 2545

@LWSS
Copy link
Contributor

LWSS commented Mar 9, 2022

👍 seems to work on 1604 too

RegisterCommand('sound', function()
    local soundId = GetSoundId()
    local localped = GetPlayerPed(-1)
    local coords = GetEntityCoords(localped, true)
    PlaySoundFromCoord(soundId, "DRYER", coords.x, coords.y, coords.z, "CARWASH_SOUNDS", true, 200, true)
    Wait(5000)
    StopSound(soundId)
    ReleaseSoundId(soundId)
end)

@hjklwasntavailable
Copy link

yeah, can confirm that "sound spamming" is being abused by cheaters

@blattersturm
Copy link
Contributor

blattersturm commented Mar 22, 2022

I don't think we should add more 'script-based' event handlers for stuff where the only valid use case would be to not route these events (unless explicitly enabled).

Similarly, if this crashes clients, this isn't something that'd be fixed by a server event handler people have to add to scripts.

@william-des
Copy link
Contributor Author

I didn't notive any crashes, but some off this sounds are just really anoying.

I'll try to submit another PR where theses events are not routed unless they are explicitly enabled with a convar

@william-des william-des deleted the feature/network-play-sound-event-parsing branch January 4, 2023 20:09
@marviniwurscht
Copy link

Heyo why has this been closed? @wdesgardin @blattersturm
I can confirm that this is needed, since a lot of modders are spamming sounds and doing stuff like ear rap1ng serverwide.
I dont know if there even is another way to detect something like this, apart from adding an event for this...
What happend to the idea "disabled by default, enable it with a convar"?
Or how about adding a convar to deactivate networked sounds in general?

@marviniwurscht
Copy link

I don't think we should add more 'script-based' event handlers for stuff where the only valid use case would be to not route these events (unless explicitly enabled).

Similarly, if this crashes clients, this isn't something that'd be fixed by a server event handler people have to add to scripts.

I think you might have misunderstood the issue we are having.
There are no crashes caused by spamming this Native. The only issue we have is that Players (especially Streamers) get annoyed when a random modder hops on the server and plays an insanely loud "BEEP" sound on every player online.
We would like to be able to "recieve" this event to identify the hackers / sound abusers and then ban them.
So the whole purpose of this event would be to identify cheaters.

@blattersturm
Copy link
Contributor

jesus christ the BUMP

@citizenfx citizenfx locked as resolved and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants