Giter VIP home page Giter VIP logo

monster_vault's Introduction

Z People and other People

To the losers who take open-sourced resources and sell them, please die in a fire.

monster_vault

Vault Script By Monster TaerAttO Please credit me. This Script for ESX Framework

Vault Box

Requirements


The following dependencys are required for this script to operate successfully without issues. please ensure you have them started in your resources and working correctly before hand.

addons that are supported

Works with

Features

-Vault Box inventory

Intergrating Inventorys Tutorial

To enable the inventory hud to work correctly with Motels you will need to add the files from the esx_inventoryhud/client/vault.lua folder to the Inventory Hud and move them to the following folder

"esx_inventoryhud/client"

Secondly we need to load these files from the Inventory Hud resource within esx_inventoryhud open the __resource.lua file and add the following lines in the client_scripts section

"client/vault.lua",

The end result would look something similar to

client_scripts {
  "@es_extended/locale.lua",
  "client/main.lua",
  "client/trunk.lua",
  "client/property.lua",
  "client/vault.lua", -- Add this By TaerAttO
  "client/player.lua",
  "locales/en.lua",
  "config.lua"
}

We now need to adjust the Javascript files for inventory hud, to allow the loading of the Inventorys successfully Open esx_inventoryhud/html/js/inventory.js

Search for

        if (type === "normal") {
            $(".info-div").hide();
        } else if (type === "trunk") {
            $(".info-div").show();
        } else if (type === "property") {
            $(".info-div").hide();
        } else if (type === "player") {
            $(".info-div").show();
        }

And replace with

        if (type === "normal") {
            $(".info-div").hide();
        } else if (type === "trunk") {
            $(".info-div").show();
        } else if (type === "property") {
            $(".info-div").hide();
        } else if (type === "vault") {
            $(".info-div").show(); -- edit from hide() to show() on this version by TaerAttO 
        } else if (type === "player") {
            $(".info-div").show();
        }

Then further down the file search for the following

$('#playerInventory').droppable({
        drop: function (event, ui) {
            itemData = ui.draggable.data("item");
            itemInventory = ui.draggable.data("inventory");

            if (type === "trunk" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromTrunk", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "property" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromProperty", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "player" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromPlayer", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            }
        }
    });

and replace with

$('#playerInventory').droppable({
        drop: function (event, ui) {
            itemData = ui.draggable.data("item");
            itemInventory = ui.draggable.data("inventory");

            if (type === "trunk" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromTrunk", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "property" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromProperty", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "vault" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromVault", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "player" && itemInventory === "second") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/TakeFromPlayer", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            }
        }
    });

A few more lines down search for

$('#otherInventory').droppable({
        drop: function (event, ui) {
            itemData = ui.draggable.data("item");
            itemInventory = ui.draggable.data("inventory");

            if (type === "trunk" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoTrunk", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "property" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoProperty", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "player" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoPlayer", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            }
        }
    });

And replace with

$('#otherInventory').droppable({
        drop: function (event, ui) {
            itemData = ui.draggable.data("item");
            itemInventory = ui.draggable.data("inventory");

            if (type === "trunk" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoTrunk", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "property" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoProperty", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "vault" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoVault", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            } else if (type === "player" && itemInventory === "main") {
                disableInventory(500);
                $.post("http://esx_inventoryhud/PutIntoPlayer", JSON.stringify({
                    item: itemData,
                    number: parseInt($("#count").val())
                }));
            }
        }
    });

In your server.cfg file

start monster_vault

And restart your server, you should then be able to use the resource

monster_vault's People

Contributors

monstertaeratto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

monster_vault's Issues

add vaulters

How can I add more vault for jobs? i mean
for the police, 3 vaults:
1st is general vault where u can put anything ecc
2st vault is only for weapons
3st vault only for requisition (like the 1st but players will use to put items ecc who taked from a criminal)

Ammo problem

Hello. If I put into vault weapon I get it with 0 ammo. Do you have any idea about fix with that? Thank you very much whatever you help me or not.

Problem with taking items out

the problem is if i use a "vault" it works for money but if i add items i cant take them back out
if i set a job for the vaults like "fueler" or "dealer" it won't let me put money in and the items doesnt show up in it aswell

more vault

how to add more vaul every time i try is thinks is a job. i put vault2 and is thinkin is a job

Add more type of vault for jobs

How can I add more vault for jobs? i mean
for the police, 3 vaults:
1st is general vault where u can put anything ecc
2st vault is only for weapons
3st vault only for requisition (like the 1st but players will use to put items ecc who taked from a criminal)

error

Hi seems like a nice little script just tried it and you do get an error on row 63 client but i fixed it for me just remove the v. in the v.coords but its just a work around wanna tip ya for it :)

Error removing items

I am having this error appear when I try to remove items from the vault
vault remove error
Can anyone please assist

error callback

error

Hi I'm using this script to create company safes and while moving objects I get this error, is there any solution?

ammo multiple

Putting the gun in and out of the vault, the ammo is doubled every time.

attemtp to index a nil value (local 'store')

Every time i open a vault on any job im getting this error but the vault working and transferring items.
Was looking for a fix but couldnt find one.

Anyone facing this problem?
55555555555555555555

Vault not opening...

Hello, The vault doesn't open,
In discord it says: [script:monster_vault] Vault: Society_police but nothing happens...

Undefined

Item shows 'Undefined ' after put in vault. Any clues?
Screenshot (149)

Save Black money

Hello,
i'm trying to change the code to other jobs save black money, i try to copy the code from police job and nothing work, have any way more easy to change that?

Thanks

delay

when i move an item to the vault or from the vault i get the nitification that it moves but it wont actually move in my inventory until i close and open the inventory again

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.