Oh, I don't know if sourcemod has matrix math functions. You'll have to check with them. If not, you could write your own by converting the ones you need from the SDK.