View Single Post
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 08-28-2015 , 15:26   Re: [CS:GO] Stop transmitting player position data
Reply With Quote #7

You are probably looking for this:

OnPluginStart:
Code:
HookUserMessage(GetUserMessageId("ProcessSpottedEntityUpdate"), Hook_ProcessSpottedEntityUpdate, true);
Code:
public Action Hook_ProcessSpottedEntityUpdate(UserMsg msg_id, Handle bf, const players[], playersNum, bool reliable, bool init)
{
	return Plugin_Handled;
}
Optionally you can force an update by using this trick if it's not enough:
Code:
int g_iVelOff;
Code:
public void OnClientPutInServer(int client)
{
	if (g_iVelOff < 1)
		g_iVelOff = GetEntSendPropOffs(client, "m_vecVelocity[0]");
}
Code:
public void OnGameFrame()
{
	for(int i=1;i<=MaxClients;i++)
	{
		if(IsClientInGame(i) && IsPlayerAlive(i))
			ChangeEdictState(i, g_iVelOff);
	}
}
__________________
zipcore is offline