Make ttt guns perform ulx commands.

I want to make it so that when you shoot a gun, it can perform a ulx command on the person who it is being pointed at. Does anyone know how to do this/if its possible?

Get the entity the player is looking at then use RunConsoleCommand() with your arguements, pretty simple.