mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Banking Stuff
This commit is contained in:
@@ -256,6 +256,14 @@ QBCore.Player.CreatePlayer = function(PlayerData)
|
||||
return false
|
||||
end
|
||||
|
||||
self.Functions.GetMoney = function(moneytype)
|
||||
if moneytype ~= nil then
|
||||
local moneytype = moneytype:lower()
|
||||
return self.PlayerData.money[moneytype]
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
self.Functions.AddItem = function(item, amount, slot, info)
|
||||
local totalWeight = QBCore.Player.GetTotalWeight(self.PlayerData.items)
|
||||
local itemInfo = QBCore.Shared.Items[item:lower()]
|
||||
@@ -358,6 +366,23 @@ QBCore.Player.CreatePlayer = function(PlayerData)
|
||||
return nil
|
||||
end
|
||||
|
||||
self.Functions.GetItemsByName = function(item)
|
||||
local item = tostring(item):lower()
|
||||
local items = {}
|
||||
local slots = QBCore.Player.GetSlotsByItem(self.PlayerData.items, item)
|
||||
for _, slot in pairs(slots) do
|
||||
if slot ~= nil then
|
||||
table.insert(items, self.PlayerData.items[slot])
|
||||
end
|
||||
end
|
||||
return items
|
||||
end
|
||||
|
||||
self.Functions.SetCreditCard = function(cardNumber)
|
||||
self.PlayerData.charinfo.card = cardNumber
|
||||
self.Functions.UpdatePlayerData()
|
||||
end
|
||||
|
||||
self.Functions.GetItemBySlot = function(slot)
|
||||
local slot = tonumber(slot)
|
||||
if self.PlayerData.items[slot] ~= nil then
|
||||
|
||||
+3
-1
@@ -247,6 +247,8 @@ QBShared.Items = {
|
||||
["printerdocument"] = {["name"] = "printerdocument", ["label"] = "Document", ["weight"] = 500, ["type"] = "item", ["image"] = "printerdocument.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "A nice document"},
|
||||
["weaponlicense"] = {["name"] = "weaponlicense", ["label"] = "Weapon License", ["weight"] = 0, ["type"] = "item", ["image"] = "weapon_license.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "Weapon License"},
|
||||
["oxy"] = {["name"] = "oxy", ["label"] = "Prescription Oxy", ["weight"] = 0, ["type"] = "item", ["image"] = "oxy.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "The Label Has Been Ripped Off"},
|
||||
["visa"] = {["name"] = "visa", ["label"] = "Visa Card", ["weight"] = 0, ["type"] = "item", ["image"] = "visacard.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Visa can be used via ATM"},
|
||||
["mastercard"] = {["name"] = "mastercard", ["label"] = "Master Card", ["weight"] = 0, ["type"] = "item", ["image"] = "mastercard.png", ["unique"] = true, ["useable"] = true, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "MasterCard can be used via ATM."},
|
||||
}
|
||||
|
||||
-- // HASH WEAPON ITEMS, NEED SOMETIMES TO GET INFO FOR CLIENT
|
||||
@@ -6346,7 +6348,7 @@ QBShared.Jobs = {
|
||||
["mechanic"] = {
|
||||
label = "Mechanic",
|
||||
defaultDuty = true,
|
||||
bossmenu = vector3(-342.291, -133.370, 38.009),
|
||||
bossmenu = vector3(-342.291, -133.370, 39.009),
|
||||
grades = {
|
||||
['0'] = {
|
||||
name = "Recruit",
|
||||
|
||||
Reference in New Issue
Block a user