Repository navigation
Releases
v1.0.2
Fixes
- Vehicle trunks can be opened again. With
inventory:targeton, ox_inventory opens a trunk only through a target option: 1.5 m, and only from behind the car. ox_target measures that distance to where you aim on the car, so standing at the boot works. sd-interact measured it to the middle of the car, about 2.3 m from the boot, so the option never showed and no trunk could be opened.- An ox_target or qb-target option with no bone or offset now sits on the part of the entity nearest you, and its distance is measured from there. Options on a bone stay on the bone, and points made with sd-interact's own exports still sit in the middle.
- Options from different scripts on the same entity no longer hide each other. Each script's options were a prompt of their own, all on the same spot, so only one of them could ever be picked. They are now one prompt: scroll through the options as usual, with the shortest-range ones first, so standing at the boot puts the trunk on top.
Install
Download sd-interact.zip below (not Source code) and replace your sd-interact folder with it. Your configs/ are unchanged from 1.0.1, so you can keep your own. The full guide is at docs.samueldev.shop/resources/interact.
sd-interact answers ox_target's exports, so restart it only with nobody on the server, then start again anything that stopped with it. Every script registers its options again when a player joins.
v1.0.1
Fixes
- Updating a point's interact distance now works past its show distance.
update(id, { interactDistance = ... })with a value larger than the point'sdistanceleft the prompt unreachable beyond the olddistance. An update now raisesdistanceto match, as creating a point already did. Thanks to @HeinoDev (#1).
New
- Danish and Swedish.
locales/da.jsonandlocales/sv.json: the word "Hold" and the key binding names in Settings. SetLocaleinconfigs/config.luato'da'or'sv'. - Options need a label. An option with no label is skipped, with a warning naming the resource that added it. A point left with no valid options isn't made (the
add*export returnsnil), and anupdatewhose options are all invalid is refused and keeps the current ones. - Clearer console messages for a failed option, a target resource that is still running, and the stand-in layers.
Install
Download sd-interact.zip below (not Source code) and replace your sd-interact folder with it. Your configs/ are unchanged from 1.0.0, so you can keep your own. The full guide is at docs.samueldev.shop/resources/interact.
v1.0.0
First release
Floating interaction prompts, drawn on the thing you look at.
- On the thing, not on the screen. The prompt is painted into the game's frame at the point, pinned to the world with no lag and sharp at any resolution.
- Press, scroll, hold. Options stack on a drum. Hold options draw an outline round the tile as you hold. Other points in range show as dots that merge when they crowd together, and a prompt behind a wall doesn't open.
- Keyboard and controller. Confirm, next and previous are FiveM key mappings, so players can rebind them, and the prompt shows the pad button on a controller.
- A small API. Points on coordinates, entities (with offsets and bones), models and every vehicle, ped, object or player nearby. Options take ox_target's handler fields and
groups, andcanInteractcan change a label as things change. - A stand-in for your target. With
setr sd_interact:replace "ox_target,qtarget", it answers ox_target, qtarget and qb-target exports with prompts, so existing scripts use it unchanged.
Install and docs
Download sd-interact.zip below (not Source code), unzip it into your resources and ensure sd-interact after ox_lib. The full guide, with examples, every export and the target replacement, is at docs.samueldev.shop/resources/interact.