From e265476b8f62f17558e84466ac253cdabd2c691d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Next=20Scripts=C2=AE?= <141370381+nextscripts-5m@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:27:30 +0100 Subject: [PATCH] Update README.md --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 2852408..767778a 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,33 @@ I didn't find many resources on the forum or on GitHub that would allow you to d 📃 [Documentation](https://next-script-tm.gitbook.io/next-scripts/free-resources/targeting) --- For the installation read the docs! + +--- + +# Usage + +```lua +exports.targeting:StartTargeting(data) +``` +data: `table` +* npc: `boolean` enable raycasting on npc's + +--- + +> An example with npc raycasting disabled +```lua +RegisterCommand("getId", function (source, args, raw) + local id = exports.targeting:StartTargeting({ + npc = false + }) + print(id) +end) +``` + +> This is equivalent to: +```lua +RegisterCommand("getId", function (source, args, raw) + local id = exports.targeting:StartTargeting({}) + print(id) +end) +```