AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   FM_PlaybackEvent for receiver (https://forums.alliedmods.net/showthread.php?t=333694)

baneado 07-29-2021 18:06

FM_PlaybackEvent for receiver
 
I want to use FM_PlaybackEvent
Code:

(int flags, const edict_t *pInvoker, unsigned short eventindex, float delay, float *origin, float *angles, float fparam1, float fparam2, int iparam1, int iparam2, int bparam1, int bparam2)
but NOT for invoker, only for receiver.

Because I need to set SUPERCEDE to block sound.
Is there any way?

Maybe another function on Reapi? Maybe another method?

Natsheh 07-29-2021 18:25

Re: FM_PlaybackEvent for receiver
 
what are you trying to achieve?

CrazY. 07-29-2021 21:08

Re: FM_PlaybackEvent for receiver
 
One could use rh_emit_sound2 or emitsound2 module if using official hlds, to emit a sound from the invoker to a receiver.
However, if what you're trying to do is replace a gun's shoot sound, just supercede"ing" the playbackevent won't stop the sound from being played because it's also handled in the client-side.

baneado 07-30-2021 13:34

Re: FM_PlaybackEvent for receiver
 
Quote:

Originally Posted by Natsheh (Post 2754048)
what are you trying to achieve?

Returning supercede to mute weapons for 3rd players that enable the /mute command (for example).
Problem? That function only appears invoker, not receiver.

I saw a server having this option. So, it's possible to do it.

Quote:

Originally Posted by CrazY. (Post 2754058)
One could use rh_emit_sound2 or emitsound2 module if using official hlds, to emit a sound from the invoker to a receiver.
However, if what you're trying to do is replace a gun's shoot sound, just supercede"ing" the playbackevent won't stop the sound from being played because it's also handled in the client-side.

I'm trying to mute weapons for one player, not the player who shoots or all players
That's why I need receiver.

baneado 08-08-2021 05:02

Re: FM_PlaybackEvent for receiver
 
Solved.

New plugin submitted:
https://forums.alliedmods.net/showthread.php?t=333823


All times are GMT -4. The time now is 21:50.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.