There are several articles (or there used to be) on the fivem resources on how to compile a DLL. I don’t know the steps off the top of my head but it essentially consists of adding the correct fivem references and compiling the dll. You add it to your server.cfg like any other resource once you have it in .dll form.