ConfigurationAdvanced
Custom Interaction
Learn how to set up custom interaction.
Setting Up Custom Interaction
To set up a custom interaction, follow these steps:
-
Open
src/resource/shared/const.lua
in the resource folder. -
Find the
CustomInteraction
table (typically at line 98). -
Enable the custom interaction by changing the
enabled
value totrue
. -
You need to make the functions
onEnter
andonExit
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 theonEnter
andonExit
functions. You can replace it with your own script. Click here to see how the code looks like. -
Save the file and restart the resource for changes to take effect.