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

Silent footsteps after last update.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BulgarianPL
Member
Join Date: Dec 2013
Old 07-09-2018 , 10:11   Silent footsteps after last update.
Reply With Quote #1

Hello. I have a COD mod server in CS:GO, and the problem is that one of the classes in there should make no noise when walking/running, but it does not work after last update. Can anyone help me with this?

Code:
#include <cstrike>
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#include <codmod>

new const String:nazwa[] = "Lekki Zolnierz";
new const String:opis[] = "Nie slychac twoich kroków";
new const String:bronie[] = "#weapon_galilar#weapon_p250#weapon_flashbang#weapon_flashbang";
new const inteligencja = 0;
new const zdrowie = 15;
new const obrazenia = 0;
new const wytrzymalosc = 0;
new const kondycja = 0;

new bool:ma_klase[65];

public OnPluginStart()
{
	cod_register_class(nazwa, opis, bronie, inteligencja, zdrowie, obrazenia, wytrzymalosc, kondycja);
	AddNormalSoundHook(DzwiekiGracza);
}

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

public cod_class_enabled(client)
{
	ma_klase[client] = true;
}

public cod_class_disabled(client)
{
	ma_klase[client] = false;
}

public Action:DzwiekiGracza(clients[64], &numclients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
	if(!IsValidClient(entity) || IsFakeClient(entity))
		return Plugin_Continue;

	if((StrContains(sample, "physics") != -1 || StrContains(sample, "footsteps") != -1) && StrContains(sample, "suit") == -1)
	{
		if(!ma_klase[entity])
			EmitSoundToAll(sample, entity);

		return Plugin_Handled;
	}

	return Plugin_Continue;
}
BulgarianPL is offline
FroGeX
Senior Member
Join Date: Aug 2020
Old 01-24-2021 , 04:46   Re: Silent footsteps after last update.
Reply With Quote #2

Try on player set SetEntProp(client, Prop_Data, "m_fFlags", 4);
FroGeX 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 07:50.


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