Raised This Month: $51 Target: $400
 12% 

Solved [CSGO] Silent footsteps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
srvmil
Senior Member
Join Date: Oct 2010
Old 01-11-2018 , 21:06   [CSGO] Silent footsteps
Reply With Quote #1

Someone already made the script for silent footsteps but can anybody please add this silent footstep for Terrorist only so CTs can't hear the Terrorist footstep. Terrorist is fully silent as this is for a mod.

Last edited by srvmil; 01-12-2018 at 02:35.
srvmil is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 01-12-2018 , 02:07   Re: [CSGO] Silent footsteps
Reply With Quote #2

PHP Code:
#include <sdktools>

ConVar sv_footsteps;

public 
OnPluginStart()
{
    
sv_footsteps FindConVar("sv_footsteps");

    
AddNormalSoundHook(FootstepCheck);

    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i) && !IsFakeClient(i))    OnClientPutInServer(i);
    }
}

public 
void OnClientPutInServer(client)
{
    if(!
IsFakeClient(client))        SendConVarValue(clientsv_footsteps"0");
}

public 
Action:FootstepCheck(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
    
// Player
    
if (entity <= MaxClients)
    {
        if(
StrContains(sample"physics") != -|| StrContains(sample"footsteps") != -1)
        {
            
// Player not ninja, play footsteps
            
if(GetClientTeam(entity) == 3)
            {
                
numClients 0;

                for(
int i 1<= MaxClientsi++)
                {
                    if(
IsClientInGame(i) && !IsFakeClient(i))
                    {
                        
clients[numClients++] = i;
                    }
                }

                
EmitSound(clientsnumClientssampleentity);
                
//return Plugin_Changed;
            
}
            return 
Plugin_Stop;
        }
    }
    return 
Plugin_Continue;

not tested
__________________
8guawong is offline
srvmil
Senior Member
Join Date: Oct 2010
Old 01-12-2018 , 02:34   Re: [CSGO] Silent footsteps
Reply With Quote #3

Yep terrorist footstep is silent. Jump is a noise but that is totally fine as it wont jump much.

CT cant hear terrorist's footstep which is also good so thanks this does indeed works.
srvmil is offline
srvmil
Senior Member
Join Date: Oct 2010
Old 01-12-2018 , 02:42   Re: [CSGO] Silent footsteps
Reply With Quote #4

CT sound abit weird, sound like it have two footstep or something.

If you could come on my server, to see what I mean?
srvmil is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 01-12-2018 , 02:56   Re: [CSGO] Silent footsteps
Reply With Quote #5

PHP Code:
#include <sdktools>

ConVar sv_footsteps;

public 
OnPluginStart()
{
    
sv_footsteps FindConVar("sv_footsteps");

    
AddNormalSoundHook(FootstepCheck);

    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i) && !IsFakeClient(i))    OnClientPutInServer(i);
    }
}

public 
void OnClientPutInServer(client)
{
    if(!
IsFakeClient(client))        SendConVarValue(clientsv_footsteps"0");
}

public 
Action:FootstepCheck(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
    
// Player
    
if (entity <= MaxClients)
    {
        if(
StrContains(sample"physics") != -|| StrContains(sample"footsteps") != -1)
        {
            
// Player not ninja, play footsteps
            
if(GetClientTeam(entity) == 3)
            {
                
numClients 0;

                for(
int i 1<= MaxClientsi++)
                {
                    if(
IsClientInGame(i) && !IsFakeClient(i))
                    {
                        
clients[numClients++] = i;
                    }
                }

                
EmitSound(clientsnumClientssampleentity);
                return 
Plugin_Stop;
            }
            return 
Plugin_Stop;
        }
    }
    return 
Plugin_Continue;

how bout this?
__________________
8guawong is offline
srvmil
Senior Member
Join Date: Oct 2010
Old 01-12-2018 , 03:01   Re: [CSGO] Silent footsteps
Reply With Quote #6

https://youtu.be/WaDdlBf-ibc
Listen to this, see what I mean? I will try your new code

EDIT: still same issue, not sure if thats normal?

Last edited by srvmil; 01-12-2018 at 03:06.
srvmil is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 01-12-2018 , 03:25   Re: [CSGO] Silent footsteps
Reply With Quote #7

PHP Code:
#include <sdktools>

ConVar sv_footsteps;

public 
OnPluginStart()
{
    
sv_footsteps FindConVar("sv_footsteps");

    
AddNormalSoundHook(FootstepCheck);

    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i) && !IsFakeClient(i))    OnClientPutInServer(i);
    }
}

public 
void OnClientPutInServer(client)
{
    if(!
IsFakeClient(client))        SendConVarValue(clientsv_footsteps"0");
}

public 
Action:FootstepCheck(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
    
// Player
    
if (entity <= MaxClients)
    {
        if(
StrContains(sample"physics") != -|| StrContains(sample"footsteps") != -1)
        {
            
// Player not ninja, play footsteps
            
if(GetClientTeam(entity) == 3)
            {
                
numClients 0;

                for(
int i 1<= MaxClientsi++)
                {
                    if(
IsClientInGame(i) && !IsFakeClient(i))
                    {
                        
clients[numClients++] = i;
                    }
                }

                return 
Plugin_Changed;
            }
            return 
Plugin_Stop;
        }
    }
    return 
Plugin_Continue;

how bout this?
__________________
8guawong is offline
srvmil
Senior Member
Join Date: Oct 2010
Old 01-12-2018 , 03:27   Re: [CSGO] Silent footsteps
Reply With Quote #8

Got an error when I try to compile it

silentfoot.sp(47) : error 030: compound statement not closed at the end of file (started at line 25)

1 Error.

EDIT: Yeah I notice theres a enter space, I backspace it up, works now. Testing. Will update you

EDIT2: Yep this is much better now, everything is normal without that weird sound finally Thank you

Last edited by srvmil; 01-12-2018 at 03:40.
srvmil is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:42.


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