Or
this
Set 'no shoot' punishment and edit it within OnTouch callback, set booleans for both players that 'InZone[activator] = true' and set InZone[activator] = false appropriately when players enters/leaves zone and check those booleans in TraceAttack/OnTakeDamage like this
Code:
public OnClientPutInServer(client)
{
SDKHook(client, SDKHook_TraceAttack, TraceAttack);
SDKHook(client, SDKHook_OnTakeDamage, TakeDamage);
}
public Action:TraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, hitgroup)
{
return (InZone[attacker] && InZone[victim]) ? Plugin_Continue : Plugin_Handled;
}
public Action:TakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
return (InZone[attacker] && InZone[victim]) ? Plugin_Continue : Plugin_Handled;
}
__________________