Page 1 of 1

[CS:GO] Duck Spamming Fix

Posted: Sun Jan 26, 2020 11:52 am
by Andreeas
This fixes crouch spamming, could be useful for some people.
Well, when I was doing my xdream surf server on cs:go (wich I rarely play), I noticed that there was some duck restriction..
So after doing cl_pdump for dumping netvars and see what happened, I saw m_flDuckSpeed being close to 0.
What could be done was pretty obvious (for coders), do the following:

Code: Select all

public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
	if (!IsInGame(client)) 
	{
		return Plugin_Continue;
	}

	new Float:DuckSpeed = GetEntPropFloat(client, Prop_Data, "m_flDuckSpeed");
	
	if (DuckSpeed < 7.0)
	{
		SetEntPropFloat(client, Prop_Send, "m_flDuckSpeed", 7.0, 0);
	}
	
	return Plugin_Continue;
}


Download
Source