Some question regarding creating new server logs

Ok so I am attempting to create logs which will print when a structure is destroyed telling you which tribe owned it and the name of the player who destroyed it.

so far I have got this:


(yes not far)

Plus I know how to get a players name, and noticed some functions to get tribe ID etc.

However I am unsure how to grab a tribe id for building ownership + unsure how to get the actor/player that caused the building to be destroyed.

Anyone have any ideas?