AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [No need to post anymore] Footsteps CS (https://forums.alliedmods.net/showthread.php?t=105864)

ot_207 10-09-2009 09:32

[No need to post anymore] Footsteps CS
 
How are the footstep sounds sent to the client?
EmitSound, EmitAmbientSound & BuildSoundMessage haven't got any relation with it (FM_Forwards)

Javivi 10-09-2009 10:18

Re: Footsteps CS
 
I've found this on my .sma folder.

PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_forward(FM_UpdateClientData"fw_UpdateClientData"1)
}

public 
fw_UpdateClientData(playersendweaponshandle)
{
    
set_cd(handleCD_flTimeStepSound999 )


With this players won't hear their own footsteps.


I hope this will help you :)

Arkshine 10-09-2009 10:28

Re: Footsteps CS
 
These sounds are played client-side, so you can not hook them.

ot_207 10-09-2009 10:36

Re: Footsteps CS
 
Quote:

Originally Posted by Javivi (Post 956634)
I hope this will help you :)

No, that is not what I was looking for.

Quote:

Originally Posted by Arkshine (Post 956639)
These sounds are played client-side, so you can not hook them.

Ok, but is there a way to send that the user has not made any step to a player?
Ex: When the players hear a footstep will only hear if he is in PVS.
PHP Code:

set_cd(CD_flTimeStepSound0// Only in PVS
//ELSE
set_cd(CD_flTimeStepSound999// IF NOT IN PVS 

I mean setting the footstep sound property block only when the player isn't in PVS.

ConnorMcLeod 10-09-2009 11:06

Re: Footsteps CS
 
CD is for 1 player, it's not something send by a player to another player.

ot_207 10-09-2009 12:18

Re: Footsteps CS
 
Quote:

Originally Posted by ConnorMcLeod (Post 956657)
CD is for 1 player, it's not something send by a player to another player.

I already know that. :|
I just gave that script as an example.

Edit: Thank you I don't need any answer now.


All times are GMT -4. The time now is 22:33.

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