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

Silent Jump in CS:GO


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jaxoR
Member
Join Date: Dec 2014
Location: Argentina
Old 04-19-2016 , 15:19   Silent Jump in CS:GO
Reply With Quote #1

Hi, I want know how to make that when a TT jump, this not make noise.

I try this, but don't work :l

PHP Code:
public OnPluginStart()
{
    
HookEvent("player_jump"Event_JumpEventHookMode_Pre);
}

public 
Action:Event_Jump(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
GetClientTeam(client) == 2)
    {
        if(
GetEntityFlags(client) & FL_FLY)
        {
            new 
flags GetEntityFlags(client);
            
SetEntityFlags(clientflags&~FL_FLY);
        }  
    }

jaxoR is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-19-2016 , 15:26   Re: Silent Jump in CS:GO
Reply With Quote #2

Barcadi, i think, some other topic:
Code:
new Handle:svFootsteps = INVALID_HANDLE;

public OnPluginStart() {
	AddNormalSoundHook(FootstepCheck);
	svFootsteps = FindConVar("sv_footsteps");
}

public OnClientPutInServer(client) {
	if(!IsFakeClient(client)) {
		SendConVarValue(client, svFootsteps, "0");
	}
}

public Action:FootstepCheck(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags) {
	if (0 < entity <= MaxClients) {
		if(StrContains(sample, "physics") != -1 || StrContains(sample, "footsteps") != -1) {
			if(GetClientTeam(entity) != 2) {
				numClients = 0;
				for(new i = 1; i <= MaxClients; i++) {
					if(IsClientInGame(i) && !IsFakeClient(i)) {
						clients[numClients++] = i;
					}
				}
				EmitSound(clients, numClients, sample, entity);
			}
			return Plugin_Stop; 
		} 
	} 
	return Plugin_Continue; 
}
EDIT: just realized that this is for footsteps, no idea if it works for jumps also.

Last edited by Mitchell; 04-19-2016 at 15:27.
Mitchell is offline
jaxoR
Member
Join Date: Dec 2014
Location: Argentina
Old 04-19-2016 , 16:01   Re: Silent Jump in CS:GO
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
Barcadi, i think, some other topic:
Code:
new Handle:svFootsteps = INVALID_HANDLE;

public OnPluginStart() {
	AddNormalSoundHook(FootstepCheck);
	svFootsteps = FindConVar("sv_footsteps");
}

public OnClientPutInServer(client) {
	if(!IsFakeClient(client)) {
		SendConVarValue(client, svFootsteps, "0");
	}
}

public Action:FootstepCheck(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags) {
	if (0 < entity <= MaxClients) {
		if(StrContains(sample, "physics") != -1 || StrContains(sample, "footsteps") != -1) {
			if(GetClientTeam(entity) != 2) {
				numClients = 0;
				for(new i = 1; i <= MaxClients; i++) {
					if(IsClientInGame(i) && !IsFakeClient(i)) {
						clients[numClients++] = i;
					}
				}
				EmitSound(clients, numClients, sample, entity);
			}
			return Plugin_Stop; 
		} 
	} 
	return Plugin_Continue; 
}
EDIT: just realized that this is for footsteps, no idea if it works for jumps also.
yep, works for jumps

The only thing is when you took the floor again (after the jump), you make a sound. Is possible remove this sound?

Last edited by jaxoR; 04-19-2016 at 16:01.
jaxoR is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-19-2016 , 16:02   Re: Silent Jump in CS:GO
Reply With Quote #4

Quote:
Originally Posted by jaxoR View Post
yep, works for jumps

The only thing is when you took the floor again (after the jump), you make a sound. Is possible remove this sound?
Try printing out the sounds, and checking what the sound file is and add it to the script.
Mitchell is offline
jaxoR
Member
Join Date: Dec 2014
Location: Argentina
Old 04-20-2016 , 10:42   Re: Silent Jump in CS:GO
Reply With Quote #5

Quote:
Originally Posted by Mitchell View Post
Try printing out the sounds, and checking what the sound file is and add it to the script.
Thanks, the sounds file is "land" if any other person need it. The only thing is that I can't block one sound, that is not printed in the server... Very strange
jaxoR is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-20-2016 , 16:22   Re: Silent Jump in CS:GO
Reply With Quote #6

Quote:
Originally Posted by jaxoR View Post
Thanks, the sounds file is "land" if any other person need it. The only thing is that I can't block one sound, that is not printed in the server... Very strange
If there is a sound that plays then it might be a client sided sound.
Mitchell is offline
Mathiaas
Senior Member
Join Date: Aug 2014
Location: Sweden ♥
Old 04-20-2016 , 18:16   Re: Silent Jump in CS:GO
Reply With Quote #7

Not sure if it will work, but you could try using
AddNormalSoundHook
.. and blocking the sound if it's the jump one? Not sure if the jump sound will call it tho, but you could try.
Mathiaas is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 04-20-2016 , 18:32   Re: Silent Jump in CS:GO
Reply With Quote #8

Quote:
Originally Posted by Mathiaas View Post
Not sure if it will work, but you could try using
AddNormalSoundHook
.. and blocking the sound if it's the jump one? Not sure if the jump sound will call it tho, but you could try.
Thats exactly what I posted, and what he is using.
Mitchell is offline
Mathiaas
Senior Member
Join Date: Aug 2014
Location: Sweden ♥
Old 04-20-2016 , 18:34   Re: Silent Jump in CS:GO
Reply With Quote #9

Quote:
Originally Posted by Mitchell View Post
Thats exactly what I posted, and what he is using.
Totally missed that, read this on my phone earlier, my bad. :-D
Mathiaas is offline
jaxoR
Member
Join Date: Dec 2014
Location: Argentina
Old 04-20-2016 , 22:20   Re: Silent Jump in CS:GO
Reply With Quote #10

Quote:
Originally Posted by Mitchell View Post
If there is a sound that plays then it might be a client sided sound.
I can block that? Or is impossible?
jaxoR 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 23:57.


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