[Free] [QB] Secret Car Stash System

hh_sskey

I am releasing this script due to fact this guy is selling it for 12$ no hate against him but he is charging way to much for such a basic and easy script which makes no sense which made me feel like why not just release this for the community. I hope you guys enjoyed!

BTW HE IS BEIGN PETTY IN DMS HE IS ASKING ME NOT TO RELEASE IT LOL!

Secret Vehicle Storage Key for QBCore

PREVIEW
DOWNLOAD

Features -

  • A secret stash that will be hidden from others which will be accessible via a key a good rp can be
    initiated the keys can be sold / found somewhere accordingly you guys know what to do with it!

  • It will be different from the glovebox and all the items in it will be stored and saved in the database!

  • This script is well optimized and we did take the idea from rookie stars post but if you go through
    the script no inspiration was taken everything was written and made from scratch!

  • This key can be only used in your own car and each car should have a different key to remove
    exploiting and overloading of database! Means once a key is used on one of the vehicles it cannot
    be used on the other owned vehicle and yes if anyone gets your key they can use the key in your
    vehicle and access it!

  • Else how it function all are in the video so go through it and enjoy!

Full support will be given on this script 24/7 support! :heartbeat:

Feel free to do whatever you want to do with this script , we are just against overpriced paid and easy to make scripts.

ACKNOWLEDGEMENT - [PAID] [QB] Secret Car Stash System

8 Likes

Damn! Better than the 12 usd!

1 Like

Few things:

  • You have some weird args on the server. Specifically in, regsecretstash. Not sure what malik is unless this is a name and if so, why you assigned something to malik2 is beyond me. Very poor for readability and refactoring.

  • You assigned PlayerPedId() to a me local which I’ve never seen anyone do lol. Most use ped or playerPed. There isn’t really anything explicitly wrong with doing it your way except for readability/refactoring.

  • You use commands for doing animations ExecuteCommand('e mechanic') but have no dependencies listed for the resource within your manifest. Probably done just to save effort instead of manually writing them, but you need to include the dependency of whatever resource you used for them.

2 Likes
  1. This our style of coding , if you understand a bit of the code you will get what malik means its our local word out here!

  2. This has nothing to do with the code as it will make no difference if we use PlayerPedId() or me we create variables to reduce the dumb effort and makes the work easier, not here to increase our work here,

  3. I think 99.9% of the qb servers use dpemotes keeping that in mind we used this but if we start dependencies on emotes we should use QBcore dependencies on every script lol.

Moreover we are here if you have any doubts I am here and if you got any issues lmk! BTW every dev have there own style of coding!

@ROCKY_southpaw

1 Like

Nice script. Great work. Thank you!

1 Like

2:
While everyone has a different code style, you should still keep in mind how local names effect refactoring. You generally avoid using words that are uncommon for what you’re doing or are localized to you otherwise refactoring is made difficult.

For example using your code as reference, within the server event regsecretstash, malik2 is used as a local for QBCore.Functions.GetPlayerByCitizenId(malik). This makes sense to use a local since its so long and you use it alot, however one of the arguments passed to it is malik. From a logic standpoint, this makes no sense to name it this way. There is no denoting what the first malik is or if its different from the second, so i would have to look at the event to see what’s being passed. Now when i search for that event, I see the argument being passed to it is baap which i assume is another thing localized to you. There is no context on the client side what baap is so now i have to do an additional search to find out what exactly is being passed for baap. baap is apparently citizen id which is also the same as malik. if you had used a proper local that denoted what it was, things would of been clearly defined.

3:
You already have the dependency by having that command. So you’d need to add it to your manifest to require dp emotes, create the command within the resource or actually play the animation with the native if you didn’t want any additional dependency/effort. TaskPlayAnim - Natives @ Cfx.re Docs

4 Likes

I have done all the requested changes from local language to so called global language , moreover any more issues let me know and I still feel it didn’t make any difference or huge change as it works the same just changing the nomenclature doesn’t change the code and your last point makes no sense as we even used QBCore so should I write QBCore as dependency, NO ! I already named this script exclusively for QB ! . Lets end this discussion if you have any more problems feel free to add pull requests on GitHub !

hell ya man! i use esx so cant use but glad to see people making good content free <3

cmon man a bit of conversion dont worry will get it soon!

1 Like

never converted anything before :o sorry

Mad respect bro, sick script and we all appreciate it <3 (except ye, the other guy)

2 Likes

You could also make a PR, the GitHub repository is public.

1 Like

Can somebody make it in ESX? pls

2 Likes

Cant as its based on QB inventory!

EDIT3: I GOT IT!!!

Here is the final result:

} else if (itemData.name == "stashkey") {

            $(".item-info-title").html("<p>" + itemData.label + "</p>");

            $(".item-info-description").html(

            "</span></p><p><strong>Plate Number: </strong><span>" +

            itemData.info.ss +

            "</span></p><p><strong>Car: </strong><span>" +

            itemData.info.car +

            "</span></p><p><strong>Owner: </strong><span>" +

            itemData.info.owner +

            "</span></p>"

            );

EDIT2:
So I ended up getting into the item description part and learned that it has to be in the app.js file.
This is the code I’m using:

    } else if (itemData.name == "stashkey") {
        $(".item-info-title").html("<p>" + itemData.label + "</p>");
        $(".item-info-description").html(
            "</span></p><p><strong>Plate Number: </strong><span>" +
            itemData.info.plate +
            "</span></p>"
        );

but the item description comes up as: “PLATE NUMBER: UNDEFINED”


EDIT:
Figured it out!

Added the item in qbcore / shared folder under items, then created an image for the key and uploaded it with the rest of the image files in qb-inventory. After that I connected the script to work with MySQL by downloading ghmattimsql resource and getting the config.json to link up with my server database. I also had to edit the first line of code in the car stash files for client.lua and server.lua adding " local QBCore = exports[‘qb-core’]:GetCoreObject() "

How can I change the item.lua for the stash key and make the description put the plate number of the vehicle it is assigned to once it is used?


Love the idea of this, I’m a bit new to server developing and what not though. After I input the folder and add it to the cfg, it says it starts up fine with no errors but if I try to giveitem stashkey it says item does not exist. I know this script is a bit old, hopefully I’m not missing an obvious updated script somewhere but if so the link would be great. I’ve tried contacting via discord but invite link is invalid.

Do I need to add the item into my server somewhere?

1 Like

Hey message me personally please I will provide you the link!

1 Like

Can i get some support please? Unable to get it to work in my server :frowning:

doesn’t work

Download the Latest Version we have updated the script to support the latest qbcore
@GreyWells @Alboz546800

Please how do I download it please send it to me