possible for other weapon , like deagle , AK47 ? block client side sounds
PHP Code:
// no client predict
public OnClientPutInServer(id)
{
SDKHook(id, SDKHook_WeaponEquip, WeaponEquip_CallBack);
}
public WeaponEquip_CallBack(id, weapons)
{
if(IsValidEdict(weapons) && IsValidEntity(weapons))
{
decl String:classname[32];
GetEdictClassname(weapons, classname, sizeof(classname));
if(StrEqual(classname, "weapon_p90"))
{
SDKHook(weapons, SDKHook_SetTransmit, SetTransmit_CallBack);
}
}
}
public Action:SetTransmit_CallBack(entity, viewer)
{
new owner = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");
if(viewer > 0 && viewer <= MaxClients)
{
new weapons = GetEntPropEnt(viewer, Prop_Send, "m_hActiveWeapon");
if(owner == viewer && weapons == GetPlayerWeaponSlot(viewer, 0))
return Plugin_Handled;
}
if(owner > 0 && owner <= MaxClients && (!IsClientInGame(owner))) SDKUnhook(entity, SDKHook_SetTransmit, SetTransmit_CallBack);
return Plugin_Continue;
}
So match bugs weapon on left hand, Weapon ammo hud bug