I think that is not currently viable do this, sincerely, our source is the biggest mess I already saw, by design it wont work for a plugin system.
For simple custom atcommands/script commands this can be made by exporting a vtable with all needed functions to the plugin and create a private store on the session_data so each plugin can have a piece of data for each player.