Here's an example:
PHP Code:
register_touch("Your_Entity_Classname", "player", "Your_Touch_Funtion")
public Your_Touch_Funtion(YourEntID, PlayerID)
{
if(!pev_valid(YourEntID))
return
if((get_gametime() - last_damage_time) < interval_time)
return
last_damage_time = get_gametime()
//use Ham_TakeDamage here...
}
In the above code, I use get_gametime() because you can control interval time < 0.1, while set_task can only have minimum of 0.1. Also, get_gametime() is far more simple.
You can store last_damage_time in a global var like last_damage_time[33] for each player, or store it in ball entity's empty value holder from fuser1 to fuser4.