Giter Site home page Giter Site logo

liamdormon / bt-target Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brentn5/bt-target

10.0 10.0 4.0 53 KB

Simple interaction system using ray casting to interact with peds, objects, vehicle bones and polyzones.

Home Page: https://github.com/Mojito-Fivem/bt-target/wiki

Lua 80.20% CSS 4.31% HTML 4.00% JavaScript 11.49%

bt-target's Introduction

Hi there I'm Liam👋

I create standalone resources and tools for FiveM. Currently working with Project Error


bt-target's People

Contributors

alessiocavallo avatar berkiebb avatar bradyy avatar brentn5 avatar cmoen11 avatar liamdormon avatar zfbx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bt-target's Issues

Add support for function and parameters event also custom vars

It would be good to extend parameter event also to function where you would pass just variable containing function.

`event = onPressed

onPressed = function(entityHit, customVars??)`

Also it would be good to have maybe addPlayerModel that will send you player Id to event/function that way you know for who player you pressed that

XSS vulnerabilities

selectTarget NUI Callback can potentially be abused by xss exploits. If the callback is called maliciously it can be used to trigger any client event specified in the body of the request. Need to look at whitelisting events and checking if bt-target is even being used.

Restart Script

When i restart bt-target i cannot use it until i reconnect

hello

Citizen.CreateThread(function()
AddTargetBone(bones, {
options = {
{
event = "door",
icon = "fas fa-door-open",
label = "Toggle Door",
},
{
event = "unlock",
icon = "fas fa-door-open",
label = "Unlock Door",
},
},
job = {"police", "ambulance", "mechanic"},
distance = 1.5
})
end)

bad argument #1 to 'pairs' table expected, got nill

function AddTargetBone(bones, parameteres)
for _, bone in pairs(bones) do
Bones[bone] = parameteres
end
end

error

Hello, I just tried the example with Vehicle bones and got this error.
I just clicked on the text.
Snímek obrazovky 2021-06-03 155159

Target Error

When I target somethig the tird eye open but then never close

im cant add pull in your resource

hello how are you thank you for more update
im try add gang job for bt-target

QBCore.Functions.GetPlayerData().gang

but all my try not successful
can add gang for new update ?

shouldShow script error

Updated to the latest version, function is just a simple inventory check wether if user has the required item.

image

^ Console outputs the function return, which is true

Code below:

image

Target eye stops working after.

Target stops working if 2 zones are too close

I have an event on a vehicle bone and target on an NPC. If I park my vehicle near the NPC and try to target the NPC, it shows events of the vehicle instead, after selecting anything on it or even pressing ESC to hide the events, the target eye stops working until I restart the resource.

Using version 1.6.3.

closeTarget missing

targetActive = false
SendNUIMessage({response = "closeTarget"})

this code is used only in nearestVehicle, i think it shoud be used in models and zone too

multiple vehicles bone and multiple models

i've added 3 different TargetsBones, one for police job, one for mechanic job and one for ambulance job, in the 3 different resources. If i join to the server only one of the 3 works, if i re-ensure all the resources all starts working.
the question is, is it possible to add multiple bones?
Same story for player models, i've used mp_m_freemode_01 and mp_f_freemode_01 to create 3 different menus, only 1 of the three works.
Am i missing something? or i need to create a "shared" menu.

Menu stuck with large CircleZone

Hey guys

Currently I am using a circle zone, i press alt and it opens without issue.
But i cannot close it myself while in the zone.

I added a script for heli rental and wanted to hook it up to a heli pad

Citizen.CreateThread(function()
	exports['bt-target']:AddCircleZone("HeliRental", vector3(-725.25, -1443.81, 5.0), 8.0, {
		name="HeliRental",
		heading=91,
		debugPoly=false,
		minZ=30.79,
		maxZ=30.99
		}, {
			options = {
				{
					event = "Helirental:openRentMenu",
					icon = "fas fa-helicopter",
					label = "Rent helicopter",
					job = {'all'},
				},
				{
					event = "Helirental:openRentMenu",
					icon = "fas fa-helicopter",
					label = "Buy helicopter",
					job = {'all'},
					shouldShow = function()
						-- if condition then
						-- 	return true -- Optional function, return true to show, false to hide option. 
						-- end
						return false
					end
				}
			},
			distance = 8.0
		})
end)

paramters on targeting script

Hello, I was curious to know if it's possible to get bt target to work with specific models and bones, but not throughout the whole game, just the one entity

like for example

local bones = {
"boot"
}

exports["bt-target"]:AddTargetBone(bones, {
options = {
{
event = "emtytrash",
icon = "fas fa-door-open",
label = "Toss in Trash",
job = {"garbage"},
eventParams = {PlayerVehicle = worktruckplate}
},

  },
  distance = 1.5
  })

With this I tried to get it to check if its the work vehicle, and if it isn't, to not display

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.