I'm not fully sure if you can block damage easily with a basic hook on something like player_hurt without having to do some storage of health before/after events and such. I've tried before and couldn't seem to overwrite the event data.
However you can detect if someones in a buy zone by using something like this:
PHP Code:
// Storage Variable
new g_PlayerInBuyZone;
// Obtain Buy Zone Offset
g_PlayerInBuyZone = FindSendPropOffs( "CCSPlayer", "m_bInBuyZone" );
if( g_PlayerInBuyZone == -1 )
{
SetFailState( "Unable to obtain offset for CCSPlayer::m_bInBuyZone" );
}
// Check Entity
new bInBuyZone = GetEntData( client, g_PlayerInBuyZone );
Those are bits from an older plugin I wrote a while back for something else. But thats how you can tell if a client is in a buy zone or not.