When i test AutoPistol on lan (windows) server with bots
it works, even i can kill bots with autofire
When i add this to server with players (linux)
it works only on client side, other players dont see even shots and 0 damage
Code:
HookEvent("weapon_fire", Event_WeaponFire, EventHookMode_Pre);
public Action Event_WeaponFire(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
RequestFrame(FirePostFrame, client);
}
public FirePostFrame(client)
{
if(IsValidClient(client))
{
new weapon = GetEntPropEnt(client, Prop_Data, "m_hActiveWeapon");
if(IsValidEntity(weapon))
{
SetEntProp(client, Prop_Send, "m_iShotsFired", 0);
}
}
}