I have done a first script in C# by following the car spawner tutorial which work perfectly.
In my Visual Studio solution I have a project for this car spawner named “Operator” and I have another one where I would develop the database service named “Database”. I wanted to use this database service in the actual car spawner project.
In the Database project I just created a static method which return a string “hello world”.
In the Operator project, I added a reference on the Database project and I trigger a chat message which call the static method of database service to display “Hello word” in the chat.
But when I call the command to display the message, the program can’t find the Database.dll.
I tried to :
put this dll near to the Operator.net.dll
put the dll in the FXServer\server directory
but the issue is still here.
server_only means “send nothing to clients”, implying you have no client_script for that ressource
If you want your secret_server_only.dll stay on server, don’t specify it in fxmanifest (secret_server_only.dll contain sensitive info as db password or is an external dll (eg: mysql))
Note If secret_server_only.dll is a FiveM server ressources, specify it in server_script
“external dll” like NewtonsoftJson, NativeUI might be used in your client_script so they have to be in “files”
If you use secret_server_only.dll in your client_script, it must be in “file” too BUT it won’t be secret because it will be sent to clients