Skip to main content
Some products need a small script to run inside your other resources. The Element 3D Pause Menu, for example, needs it to see the map markers those resources create. That script is called an integration, and an installer that comes with the release adds it for you. A product needs this only when its install folder contains the installer files. Its installation page says so too.

What the installer changes

It visits every resource under your resources folder and adds one line near the top of its fxmanifest.lua, pointing at a file inside the product:
Nothing else in your resources changes. The product’s own folders are skipped, its _assets folder included, and every fxmanifest.lua keeps the text encoding it had. The added script is Lua, so it only reaches the Lua scripts of a resource. For a resource written in JavaScript or C#, the product’s For scripters pages say what that resource sends instead. Running the installer again first removes the lines it added before, so a resource never gets two copies.

Before you start

  • The product is installed and starts without errors. See Install a product.
  • A backup of your resources folder. The installer edits files that belong to your other resources.
  • On Linux, a shell with find, grep and perl. On Windows, nothing extra: the installer uses PowerShell, which Windows includes.

Steps

1

Run the installer from the product's install folder

It finds your resources folder by walking up from where it is, so run it from inside the product’s install folder and leave it there.
Double-click windows-install-hooks-element_3d_pausemenu.bat, or run it from a terminal in that folder. The .bat starts the .ps1 file next to it, so keep both together.
It prints Patched: and the path of each fxmanifest.lua it changed, then Hooks applied successfully! on Windows or Done! on Linux.
2

Restart the server

Each resource reads the new line when it starts.

Check that it worked

Open the fxmanifest.lua of one of your other resources. The line above is near the top, below fx_version and game. Then check in game that the feature that needed the integration works. The product’s own pages say which feature that is.

When to run it again

The installer only reaches resources that existed when it ran. Run it again:
  • after adding a resource to your server;
  • after every update of the product, because the update replaces the files the line points at and the installer itself.

Remove an integration

Remove the integration before you remove the product. Otherwise your other resources keep pointing at a file that no longer exists.
1

Run the uninstaller from the same folder

windows-uninstall-hooks-element_3d_pausemenu.bat on Windows, or ./linux-uninstall-hooks-element_3d_pausemenu.sh on Linux. It prints Cleaned: and the path of each fxmanifest.lua it changed, then Hooks removed successfully! on Windows or Done! on Linux. Every other line in your resources stays as it was.
2

Restart the server

A release whose install folder has no uninstaller is older than the uninstaller itself. For that release, delete every line starting client_script '@element_3d_pausemenu/integrations/ from your resources’ fxmanifest.lua files by hand.

Next steps