Giter Site home page Giter Site logo

conde-b1g_inventory's Introduction

conde-b1g_inventory 1.0.0

Inventory HUD for ESX based on TSRAK esx_inventoryhud made by me and B1G https://github.com/CarlosVergikosk.

Most of the code of the shops was taken from SUKU's suku shops for esx_inventoryhud, although some features were added, like ilegal shop, police shop, price easily changeable on the config, and some other spicy stuff :)

The weapons as items part is made like in disc_inventoryhud, and for that reason it uses disc_ammo in which you can easily remove the disc_base dependency if you want!

This resource should work on ESX 1.2, but I use a version before the 1.2 and after the weight update!

You can get it to work with most of esx_inventoryhud plugins, like trunk, property etc.. Check the js file most things come already pre configured!

Most of the notifications are in Portuguese, so if any kind sould want to translate them, that would be apreciated!

I may give some support, but won't 100% guarantee.

That's pretty much it, this is like the ultimate inventory hud that you can have on your ESX server without breaking or leaving your server unplayable, I'll list the features down below.

Requirements

Features

  • Drag and drop
  • Using items
  • Dropping items
  • Giving items
  • Cash included
  • Accounts support (bank, black money, ...)
  • Weight Supported
  • Weapons as items
  • 5 Usable Fast Items hotbar: 1, 2 ,3 ,4 ,5 keys
  • Blocked Weapon Wheel
  • Inventory items notification (anytime you receive or lose an item, check installation for more info)
  • Fast items Hotbar , ALT is the default key.
  • Animations with props, when you give an item. Check the config to add more props to each item!
  • Integrated status hud, so you can have a clean hud while you play!
  • Easy shortcuts to use items, double click uses the item and closes the inventory, right click puts the item on fast item hotbar or in the second inventory.
  • Steal the body of a dead or handcuffed player!
  • Optimized
  • Some other stuff, I'll probably remember later :)

Screens

Commands

  • /steal - Steals nearby player's inventory
  • /closeinventory - Closes the inventory if needed

Installation

  • Download the code and change the folder name to conde-b1g_inventory
  • This should be pretty much drag and drop, change the essentialmode on the sql file to whatever is your database name, and run it.
  • To add the notifications, just trigger this event on your es_extended classes/player functions. Ex: addInventoryItem, removeInventoryItem, addMoney, removeMoney:
	self.addMoney = function(money)
		money = ESX.Math.Round(money)

		if money >= 0 then
			self.player.addMoney(money)
			TriggerClientEvent('conde-inventoryhud:notification',self.source, "cash", "Money", money, false)
		end
	end

	self.removeMoney = function(money)
		money = ESX.Math.Round(money)

		if money > 0 then
			self.player.removeMoney(money)
			TriggerClientEvent('conde-inventoryhud:notification',self.source, "cash", "Money", money, true)
		end
	end
	
	
		self.addInventoryItem = function(name, count)
		local item = self.getInventoryItem(name)

		if item then
			count = ESX.Math.Round(count)

			local newCount = item.count + count
			item.count = newCount

			TriggerEvent('esx:onAddInventoryItem', self.source, item.name, item.count)
			self.triggerEvent('esx:addInventoryItem', item.name, item.count)
			TriggerClientEvent('conde-inventoryhud:notification', self.source, item.name, item.label, count, false)
		end
	end

	self.removeInventoryItem = function(name, count)
		local item = self.getInventoryItem(name)

		if item then
			count = ESX.Math.Round(count)
			local newCount = item.count - count

			if newCount >= 0 then
				item.count = newCount

				TriggerEvent('esx:onRemoveInventoryItem', self.source, item.name, item.count)
				self.triggerEvent('esx:removeInventoryItem', item.name, item.count)
				TriggerClientEvent('conde-inventoryhud:notification',self.source, item.name, item.label, count, true)
			end
		end
	end
  • To make the status to work just change the events on line 250 client/main of the inventory, to your basic needs or stress events.

conde-b1g_inventory's People

Contributors

danielescadas avatar iwanheda avatar pedrito6 avatar

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.