Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed

Conversation

@Necktrox
Copy link

@Necktrox Necktrox commented May 12, 2017
edited
Loading

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

Loki214 reacted with thumbs up emoji ZReC and Loki214 reacted with heart emoji
Copy link

i love you

Copy link
Contributor

qaisjp commented May 13, 2017

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.

Copy link
Author

I reverted that specific commit to keep the onClientWorldSound event name, but I left the restriction for players and peds there.

qaisjp reacted with thumbs up emoji

@Necktrox Necktrox changed the title (削除) Add new event onClientPedSound (削除ここまで) (追記) Add new event onClientWorldSound (追記ここまで) May 13, 2017
Copy link

@CrosRoad95 CrosRoad95 May 13, 2017
edited
Loading

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

Copy link
Author

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

@qaisjp qaisjp added the enhancement New feature or request label May 13, 2017
@botder botder added refactor new-feature and removed enhancement New feature or request labels Jul 9, 2018
@botder botder changed the title (削除) Add new event onClientWorldSound (削除ここまで) (追記) [WIP] Add new event onClientWorldSound (追記ここまで) Jul 14, 2018
@patrikjuvonen patrikjuvonen added enhancement New feature or request and removed new feature labels Sep 4, 2018
@patrikjuvonen patrikjuvonen changed the title (削除) [WIP] Add new event onClientWorldSound (削除ここまで) (追記) WIP: Add new event onClientWorldSound (追記ここまで) Sep 4, 2018
@botder botder self-assigned this Sep 27, 2018
Copy link
Member

botder commented Sep 27, 2018

Added in 8302b4c

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

Reviewers

1 more reviewer

@CrosRoad95 CrosRoad95 CrosRoad95 left review comments

Reviewers whose approvals may not affect merge requirements

Labels

enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /