Thanks Marttt,
I tried to use HookEvent, because I want to disable it once charging start not necessary when charging a survivor
PHP Code:
HookEvent ("charger_charge_start", Event_InfectedAbilityStart);
HookEvent ("charger_pummel_start", Event_InfectedAbilityStart);
HookEvent ("choke_start", Event_InfectedAbilityStart);
HookEvent ("lunge_pounce", Event_InfectedAbilityStart);
HookEvent ("jockey_ride", Event_InfectedAbilityStart);
I'm a bit confused with it, tried many ways but not sure how to make it work.
PHP Code:
public void Event_InfectedAbilityStart (Event event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId (event.GetInt("userid"));
if (client && IsClientInGame(client) && !IsFakeClient(client) && IsInfected(client))
{
Speeding [client] = false;
SetEntPropFloat (client, Prop_Data, "m_flLaggedMovementValue", 1.0);
}
return;
}
I tried different ways but still didnt work for me