[CS:GO] Duck Spamming Fix

Post Reply
User avatar
Andreeas
Hero Member
Hero Member
Posts: 601
Joined: Wed Jan 22, 2020 8:17 pm
Jucator SA:MP ?: Nu
Nick:: Andreeas
Jucator CS ?: Nu

[CS:GO] Duck Spamming Fix

Post 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
Post Reply

Return to “General Purpose”