The hook only affects the entity-- not all entities of the classname. You can still hook other entities of the same class. Also, you can hook more than one entity, i.e.:
PHP Code:
// hook entities to a particular callback
HookSingleEntityOutput(entity1, "OnStartTouch", ontouch);
HookSingleEntityOutput(entity2, "OnStartTouch", ontouch);
HookSingleEntityOutput(entity3, "OnStartTouch", ontouch);
HookSingleEntityOutput(entity4, "OnStartTouch", someothercallback);
// let's say some player touches entity1. The following callback is fired
public ontouch(const String:output[], caller, activator, Float:delay)
{
if (IsValidEdict(caller)) RemoveEdict(caller);
// hook is removed for the destroyed caller (entity1), but remain for other hooked
// entities (i.e. entity2 and entity3) that are not destroyed yet.
// if the player then touches entity2, then entity2 is removed but entity3 is still hooked.
}
// fired for entity4
public someothercallback(const String:output[], caller, activator, Float:delay)
{
// do something
}
As for your second question, no, you cannot remove the the declarations and data types; otherwise, the data being passed will be assumed to be integers, and that is not the case here.