Using a plugin written in C++, you derefrence an action to point it to your loop (which is written in C++, no ASM needed here). You then run the action using triggers.
So make it so some action has its normal function replaced with my code? How would I do that? (I think I almost understand.)
EDIT: ASM looks a lot easier than C++ for this, could I write my code in ASM or would it have to be in C++?
None.
It has to be written in C++, but you can use inline ASM within C++. I can upload a tutorial on how to derefrence an action.