AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [CS:GO] Silent footsteps (https://forums.alliedmods.net/showthread.php?t=328576)

Eagle08 11-16-2020 04:39

[CS:GO] Silent footsteps
 
Hi,

Panorama update brought summary screen after match, which shows random statistics per player. I was wondering how footsteps and silent footsteps are counted, as there is a record which shows it.

Any ideas how to count it? Is there anything You have to add to the OnPlayerRunCmd, like:

PHP Code:

if(buttons IN_WALK)
{
    
PrintToChat(client"[DEBUG]Your silent steps: %d"silentsteps[client]);
    
silentsteps[client]++;


It doesn't seem to be working. Any other ideas?

Also, I thought of making player footstep sound silent(other players can't hear your footsteps) after making 20 000 silent steps before(like achievement). I have no idea how to do it. I would appreciate any help.
Thanks

Kellan123 11-16-2020 14:26

Re: [CS:GO] Silent footsteps
 
https://sm.alliedmods.net/new-api/sd...ormalSoundHook

ZASTRELIS 11-18-2020 05:24

Re: [CS:GO] Silent footsteps
 
jump sound on client side, so you can't remove it

Ilusion9 11-18-2020 06:54

Re: [CS:GO] Silent footsteps
 
Quote:

Originally Posted by ZASTRELIS (Post 2725372)
jump sound on client side, so you can't remove it

You can block jump sounds and footsteps with AddNormalSoundHook, I did it.
He wants to detect silent footsteps, which you cannot do with AddNormalSoundHook, because there are no sounds.

I think OnPlayerRunCmd is the answer by detecting if client is pressing W, A, S or D and SHIFT (IN_WALK).

Eagle08 11-18-2020 08:29

Re: [CS:GO] Silent footsteps
 
Thanks for all your replies.

I used AddNormalSoundHook and it worked. I didn't want to block jump or other sounds, just steps, so that was perfect for me.

But I still have no idea how to count steps. I know it is possible to detect if client is holding SHIFT or any move key, but how would You know how many steps has he done? He can still hold SHIFT but, don't move.
How often or when is OnPlayerRunCmd executed?

Thanks in advance.


All times are GMT -4. The time now is 16:24.

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