RoughHades ScriptsRoughHades Scripts

RoughHades Target

Look at something, get a prompt. Fully standalone.

Prerequisites

  • A working FXServer build (recent cerulean fx_version). That's the whole list -- this resource doesn't depend on anything else, including RoughHades Core.

Installation

  1. Download the resource from your Tebex purchase and extract it into your resources directory.
  2. Rename the extracted folder to REPLACE_ME_resource_folder_name if it isn't already.
  3. Add it to server.cfg:
ensure REPLACE_ME_resource_folder_name
  1. Open config.lua to adjust the default interaction range (3m by default) if you want it shorter or longer.

Usage (for other resources/developers)

Five ways to register an interaction:

exports.REPLACE_ME_resource_folder_name:AddTargetModel(models, options)
exports.REPLACE_ME_resource_folder_name:AddTargetEntity(entity, options)
exports.REPLACE_ME_resource_folder_name:AddTargetZone(coords, radius, options)
exports.REPLACE_ME_resource_folder_name:AddTargetPlayer(options)
exports.REPLACE_ME_resource_folder_name:AddTargetVehicle(options)

options can be a static list of actions, or a function that resolves fresh each time -- useful when the right action depends on live state (a property's "Buy" flipping to "Enter" once someone owns it, for example).

Verifying it's working

Look at any entity you've registered with AddTargetModel/AddTargetEntity from within range -- you should see a context prompt appear, and a numbered menu if more than one resource has registered an option for it.

Troubleshooting

  • No prompt appears: confirm you're within the configured interaction range (3m default) and actually looking at the entity, not just near it.
  • Menu shows the wrong options, or options from another resource are missing: each resource registers independently -- check that the other resource's AddTarget* call is actually running (no errors on its own start).

Still stuck? The fastest way to get help is Discord.