Git Product home page Git Product logo

qb-vehiclekeys's Introduction

qb-vehiclekeys

Vehicle Keys System For QB-Core

Vehicle Key NUI Preview

[Preview Here]

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

qb-vehiclekeys's People

Contributors

ahmed608 avatar anishbplayz avatar azutake avatar berkiebb avatar citrattv avatar dennrick avatar dertweaky360 avatar djraymond avatar evanillaa avatar ghzgarage avatar googleoblivion avatar jay-fivem avatar kamuikody avatar newtonzz avatar pushkart2 avatar r0adra93 avatar re1ease avatar samshanks1 avatar singh-manavv avatar steveski avatar suelthedev avatar theilleniumstudios avatar tom-osborne avatar tonybynmp4 avatar troughy avatar tuben86 avatar wanderrer avatar wickednz avatar woerki avatar z3rio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qb-vehiclekeys's Issues

Lock/Unlock sound bug

Hello, when you lock or unlock a car, other players throughout the server can hear the sound effect.
Using onesync.

How can i use this?

How can i use this to set some vehicles not locked...?

Entity(entering).state.ignoreLocks

GetClosestVehicle function not working

function LockVehicle() isn't working because
local veh = QBCore.Functions.GetClosestVehicle()
doesn't seem to work.

If anyone has any idea how to fix this, please let me know.
Thanks in advance

Hotwire Bug

I think it may be the same issue as #52, however, I thought I would expand on this and their issue seemed vague.
The issue seems to be the first time you lockpick a car and get in your get the prompt to hotwire (as intended), however, the next time you lock pick a car WITHOUT trying to enter it before lockpicking you can just get in a drive away.
Looking at the code it seems to be something with the HasKey variable not being reset to false when entering a new car.

GiveCarKeys to nearest player

Hello this may be a dumb question or not but i'm pretty much new to Lua and already am a web developper (Junior) working on my own server. I was wondering since i am using a menu and calling the RegisterNetEvent "cehiclekeys:client:GiveKeys" in my menu it cannot get the id of the person close to me.

Here is the code

RegisterNetEvent('vehiclekeys:client:GiveKeys', function(target))
    local vehicles = IsPedInAnyVehicle(PlayerPedId())
    if vehicles then
        local plate = QBCore.Functions.GetPlate(GetVehiclePedIsIn(PlayerPedId(), true))
        TriggerServerEvent('vehiclekeys:server:GiveVehicleKeys', plate, target)
    else
        QBCore.Functions.Notify('you need to be in a vehicle to give key', 'error')
    end
end)

I do know there is a another function above that called GetNearbyPed which is this code below.

local function GetNearbyPed()
    local retval = nil
    local PlayerPeds = {}
    for _, player in ipairs(GetActivePlayers()) do
        local ped = GetPlayerPed(player)
        PlayerPeds[#PlayerPeds+1] = ped
    end
    local player = PlayerPedId()
    local coords = GetEntityCoords(player)
    local closestPed, closestDistance = QBCore.Functions.GetClosestPed(coords, PlayerPeds)
    if not IsEntityDead(closestPed) and closestDistance < 30.0 then
        retval = closestPed
    end
    return retval
end

I've tryed passing it down into the Givekey target but doesnt seem to work. If someone could help me with this that would be awesome. In the meantime ill try to figure it out.

hotwiring

after pressing a sucessfull hotwire the playing is able to get into any vehicle and start it without hotwiring again

[Bug] givecarkey command

If you don't have the key to a car, just another player has the key of another car and type givecarkey command for you, you will have the key to this car without having to use lockpick

add more function

I hope there is a function for each of the following scripts:
house function haskey = returns the value of true or false
vehilcekey function haskey = returns the value of true or false
qb-inv function haveitem = returns the value of true or false
return exports["qb-house"]:isNearHouse(true)
return exports["qb-house"]:HaveKey(true)
return exports["qb-vehilcekey"]:HaveKey(true)
exports["qb-inventory"]:haveitem("lockick", 1,)
It is easy to use other projects
I hope to see this in qbcore

example

Vehicle Hotwire

Hello, I found a bug.

If you break into an AI car -> want to hotwire it -> get out and get into another car.
Do you have to hotwire out too. Even if it belongs to you, you have to short-circuit it too.

I uploaded a video about it:
https://youtu.be/F_ML255o4nA

Lockpicking cars removed

After the update 4 hours ago, local cars don't need lockpicking to use. It all became free to use.

You can add the mugging thing back without hurting the cpu ms

if IsPlayerFreeAiming(PlayerId()) then local aiming, target = GetEntityPlayerIsFreeAimingAt(PlayerId()) if aiming and (target ~= nil and target ~= 0) then if DoesEntityExist(target) and not IsPedAPlayer(target) then if IsPedInAnyVehicle(target, false) and not IsPedInAnyVehicle(PlayerPedId(), false ) then if not IsBlacklistedWeapon() then local pos = GetEntityCoords(PlayerPedId(), true) local targetpos = GetEntityCoords(target, true) local vehicle = GetVehiclePedIsIn(target, true) if GetDistanceBetweenCoords(pos.x, pos.y, pos.z, targetpos.x, targetpos.y, targetpos.z, true) < 13.0 then RobVehicle(target) end end end end end end

Few bugs that should be looked at. IMO

Just discovered a few bugs while testing this script.

-Script doesn't check if a car door was lockpicked and opened or not, it lets players lockpick NPC car doors an infinity times even after success.
-If you lockpick a car and press "g" it writes that the engine started when it didn't.
-If the player starts lockpicking a car and it drives away, lockpicking action should cancel? (Same with robbery?)

key problem

When the vehicle is unlocked from the inside, the player does not get keys
notice appears
QBCore.Functions.Notify('Opened Door!', 'success')

car key issues

car key is not deleted when you give it to someone else

Police Alerts

No police alerts occur whatsoever to the police when robbing vehicles from Civs. I have changed the config to 100% but the issue still occurs.

Fresh qb-vehiclekeys too

Discord Report

When you lock a vehicle, you can still get out. Add disablekeys for exiting vehicle

Lockpick issue

Standard lockpick won't work for me, I tried deleting the qb-lockpicks and installing it again but its still the same, meanwhile advanced lockpicks works normal, tbh no idea what to do at this point... also no errors are displayed

LockPick

Hi
When a robot car opens
All robot cars open
No need for LockPick next time
please check it
Thank you for your tireless efforts

Suggestion

Make the auto theft more realistic. If you are pulling someone from vehicle with engine is running there should be no need to Hotwire or lockpick the ignition. If the vehicle is parked then you should need to lockpick the door lock and Hotwire the ignition.

AdvancedLockpick Bug

Hi
I use AdvancedLockpick for unlock vehicle
But delete lockpick on my inventory
Please check this

many bugs

  • you sometimes get locked out of a vehicle no matter how many times you lock and unlock the vehicle
  • peds don't get out of vehicles when you point a gun at them they will just run you over
  • when you lock pick a car door it will automatically give you the keys and allow you to start the engine but if you try and lock the vehicle it says you don't have keys

Vehicle Robbery

When robbing NPC vehicles at gunpoint, when successful, the NPC driver gets out the vehicle and immediately jumps back in and drives away

doesnt save key

When people get crash and logout. When they login again the car is lock and tell that people doesnt have any key for that car?
I think be cause the the doesnt save in server

Get out of Locked Vehicles

At the moment, it's possible to get out of locked vehicles, where before that wasn't happening. Anyone having similar issues?

Rob vehicle bug

After done robbing the ped of his vehicle he just gets back in the car and drives off

Lock cars

Hi, when u are opening a car with the keys the others players still see the car locked.

And when u are out of the vehicle for a little bit of time the car automatically close by self

Lockpicking

Found that when lockpicking one vehicle successfully you don't need to hotwire plus you don't need to lockpick other cars, you can just go right in them without lockpicking or hotwiring

cd_dispatch as police alerts?

It was reported on the PR, that police alerts don't work due to it being supported by a external script, cd_dispatch. Most won't have it, as it's £50. And two it's not supported by qb-core?

Vehicles Keys issue

Appears when doing the /car command and the vehicle will not spawn.

[script:qb-vehiclekey] SCRIPT ERROR: @qb-vehiclekeys/server/main.lua:57: table index is nil

'GetPlate'

SCRIPT ERROR: @qb-vehiclekeys/client/main.lua:18: attempt to call a nil value (field 'GetPlate')

Lockpicking One Lockpicks All

Hello,

I have an issue where if I lockpick a vehicle, any vehicle I attempt to lockpick after that is automatically unlocked and able to drive without hotwire.

I also saw, if you attempt vehicle robbery of a local, you cannot steal a car of anymore locals after that.

I thought both may have been a radius trigger of some sort, but it was the same across the map. Please help.

Suggestion: Whitelisting vehicles to be unlocked.

I have an AITaxiPro script, and when we call for an AI Taxi it always shows up locked and we can't get in.

This script in particular is a premium script coded with DLL Files so we can't edit it to unlock the doors when it arrives.

Was wondering if someone would be willing to code in where we can add in the config vehicle models we would like to remain unlocked indefinitely.

I'm not advanced enough to figure out how to do it unfortunately just enough to get by.

Thanks :)

lockpick issue

when lockpicking one vehicle successfully you don't need to hotwire plus you don't need to lockpick other cars, you can just go right in them without lockpicking or hotwiring

vehicle engine issue

Whenever you enter a vehicle that you do not own the keys to it will shut off the engine and requires you to use a lockpick to hotwire it BUT you can bypass this by using any command or script that toggles the engine for example one of the core commands "/engine" allows you to do this. Which completely removes the point of having the lockpicking minigame.

Lockpick & Skillbar Exploit

if someone uses the lockpick and the skillbar gets triggered, they can get out of vehicle & it gets succeeded even after failing.

cd_dispatch edit help?

Could anyone help me figure out how to make alerts from car jacking use cd_dispatch for alerts? I have been trying to get it working but had no luck.

Here is a link to the install for cd_dispatch >>> https://docs.codesign.pro/paid-scripts/dispatch

I have no clue where to put the code to make it work and no one has been much help on their discord I already tried asking for help there.

Suggestion

  • All spawned/parked cars with closed doors;
  • Cars driven by peds with doors open;
  • Cars driven by players open or closed depending on player action;
  • Cars dont automatically close when you leave them;
  • Stolen cars dont need to be lockpicked by other players to get in;

thank you for your work

Hotwiring multiple vehicles

If you hotwire one vehicle, exit it and sit in another vehicle without hotwiring, the original vehicle you hotwired will not detect you have already hotwired it. Issue happens aswell if you exit your owned car, enter a npc car and dont hotwire it, enter your car and it doesnt detect you have the keys for your owned vehicle. Would be appreciated if someone could look into this.

bug hotwaire ?

if IsPedInAnyVehicle(ped, false) and lockpicked and not IsHotwiring and not HasKey then

If all the cars on the road are closed, the doors are closed
You can't open the door unless you kill the driver
In this case, you cannot use hotwaire

Cars parked on the road
You can open it with a lockpick
You can start the vehicle without doing anything
The vehicle runs without anything
But it is correct after unlocking the vehicle with the lockpick
To attempt to operate the vehicle through qb-skillbar or hotwire

This is where the work gets a bit good
and suitable for everyone
Because everyone knows these ways

While you are in the trial period, do not restart the script while you are inside the vehicle

bug when using aim

When aiming at the pistol On ped in car
There is a problem that the ped does not get out of the vehicle after handing over the key
He hits me with the car
Try while you are in front of the vehicle

lock car

when the player locks the car and exits the game, when they reconnect they can't open the car

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.