ConfigurationAdvanced

Custom Interaction

Learn how to set up custom interaction.

Setting Up Custom Interaction

To set up a custom interaction, follow these steps:

  1. Open src/resource/shared/const.lua in the resource folder.

  2. Find the CustomInteraction table (typically at line 98).

  3. Enable the custom interaction by changing the enabled value to true.

  4. You need to make the functions onEnter and onExit compatible with your interaction script. These functions are called when a player enters or exits the interaction area.

    There's by default a example of qb-target in the onEnter and onExit functions. You can replace it with your own script. Click here to see how the code looks like.

  5. Save the file and restart the resource for changes to take effect.

On this page