-
-
Notifications
You must be signed in to change notification settings - Fork 499
WIP: Add new event onClientWorldSound #133
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
WIP: Add new event onClientWorldSound #133
Conversation
CrosRoad95
commented
May 12, 2017
i love you
Not sure about the feasibility of this event, but it's probably best to keep the name as "world sound" to make it open to supporting more groups in the future.
I reverted that specific commit to keep the onClientWorldSound event name, but I left the restriction for players and peds there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sound can be from example: vehicles, explosion vehicle/barrels/gas station etc, weapons, destroyed objects
so, if element isnt ped/player then source=nil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The pull request description tackles this issue: The hooked GTA:SA function doesn't handle a lot of sounds and that's why it is restricted to player/ped entities, because you can only cancel these.
- The source element can never be nil, it's either the source element or root
This reverts commit b3ed2d69c7380ad90706ab1617aab3ae9c1d390a.
89d1ab1 to
d2ca755
Compare
Added in 8302b4c
Uh oh!
There was an error while loading. Please reload this page.
Description
This pull request adds a new event called
onClientWorldSound. The event is restricted to players and peds. This comes in handy if you want to replace the step sounds whenever a player or ped emits these (doesn't work with server-side created peds).The provided GTA:SA hook is not able to cancel every sound emitted. While testing I discovered it detects the random gun shooting with a NULL entity, but to my disappointment, you couldn't detect various other sounds.
I have restricted the event to player/ped related sounds. Scripters can use this event to cancel the step sounds (IIRC it was group 5) to add their own sounds (maybe even use the material the player/ped is standing on) or to use the sound position in a popular gamemode called DayZ.
Issues:
#9606: [Request] onPedTakeStep
#7074: onClientWorldSound not canceled (relevant, but not solved due to sound-canceling issues)
Images
onclientworldsound