View Single Post
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-21-2018 , 00:04   Re: CS:GO slow when hit
Reply With Quote #13

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

public OnPluginStart()
{	
	HookEvent("player_hurt", EventPlayerHurt, EventHookMode_Pre);
}	

public Action:EventPlayerHurt(Handle:event, const String:name[],bool:dontBroadcast)
{
	new i = GetClientOfUserId(GetEventInt(event, "userid"));
	
	if(i == 0) return Plugin_Continue;
	if (GetEntPropFloat(i, Prop_Send, "m_flVelocityModifier") < 0.6) SetEntPropFloat(i, Prop_Send, "m_flVelocityModifier", 0.6);

	return Plugin_Continue;
}

Last edited by Indarello; 03-21-2018 at 00:05.
Indarello is offline