From f09c665d9c3b0dc948c73b6aa53889857bf7a98d Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:52:59 +0100 Subject: [PATCH 01/13] =?UTF-8?q?=F0=9F=92=B1=20Added=20money=20transfer?= =?UTF-8?q?=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/functions.lua | 48 ++++++++++++++++++++++++++++++++++++++++++++ server/player.lua | 23 +++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/server/functions.lua b/server/functions.lua index a068e6b38..fb7abb6c8 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -582,3 +582,51 @@ function QBCore.Functions.PrepForSQL(source, data, pattern) end return true end + +---Do a money transactio between players +---@param emitercid string +---@param emitermoneytype "cash" | "bank" | "black_money" +---@param receivercid string +---@param receivermoneytype "cash" | "bank" | "black_money" +---@param quant number +---@param reason string +---@return boolean +function QBCore.Functions.TransferMoney(emitercid, emitermoneytype, receivercid, receivermoneytype, quant, reason) + local EmiterPlayer = QBCore.Functions.GetPlayerByCitizenId(emitercid) + local ReceiverPlayer = QBCore.Functions.GetPlayerByCitizenId(receivercid) + if not tonumber(quant) then return false end + quant = tonumber(quant) or 0 + local errorOnLast = false + if EmiterPlayer then + if not EmiterPlayer.Functions.RemoveMoney(quant, emitermoneytype, reason) then return false end + else + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { emitercid }) + if not result then return false end + result = json.decode(result) + result[emitermoneytype] -= quant + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), emitercid }) then return false end + end + if ReceiverPlayer then + if not ReceiverPlayer.Functions.AddMoney(quant, receivermoneytype, reason) then errorOnLast = true end + else + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { receivercid }) + if not result then errorOnLast = true end + result = json.decode(result) + result[receivermoneytype] += quant + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), receivercid }) then return false end + end + + if errorOnLast then + if EmiterPlayer then + if not EmiterPlayer.Functions.AddMoney(quant, emitermoneytype, reason) then return false end + else + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { emitercid }) + if not result then return false end + result = json.decode(result) + result[emitermoneytype] += quant + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), emitercid }) then return false end + end + return false + end + return true +end diff --git a/server/player.lua b/server/player.lua index b8c846b5d..9c3600ace 100644 --- a/server/player.lua +++ b/server/player.lua @@ -388,6 +388,29 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline) return true end + function self.Functions.TransferTo(emitermoneytype, receivercid, receivermoneytype, quant, reason) + local ReceiverPlayer = QBCore.Functions.GetPlayerByCitizenId(receivercid) + if not tonumber(quant) then return false end + quant = tonumber(quant) or 0 + local errorOnLast = false + if not self.Functions.RemoveMoney(quant, emitermoneytype, reason) then return false end + if ReceiverPlayer then + if not ReceiverPlayer.Functions.AddMoney(quant, receivermoneytype, reason) then errorOnLast = true end + else + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { receivercid }) + if not result then errorOnLast = true end + result = json.decode(result) + result[receivermoneytype] += quant + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), receivercid }) then return false end + end + + if errorOnLast then + self.Functions.AddMoney(quant, emitermoneytype, reason) + return false + end + return true + end + function self.Functions.GetMoney(moneytype) if not moneytype then return false end moneytype = moneytype:lower() From e6274cbc31eb4b2bead07817c141d0540ea6cab3 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:07:12 +0100 Subject: [PATCH 02/13] =?UTF-8?q?=F0=9F=91=85=20Fixed=20annotation=20to=20?= =?UTF-8?q?`TransferMoney`=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/functions.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index fb7abb6c8..2fc415b6f 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -585,9 +585,9 @@ end ---Do a money transactio between players ---@param emitercid string ----@param emitermoneytype "cash" | "bank" | "black_money" +---@param emitermoneytype string -- Only money types in QBConfig.Money.MoneyTypes ---@param receivercid string ----@param receivermoneytype "cash" | "bank" | "black_money" +---@param receivermoneytype string -- Only money types in QBConfig.Money.MoneyTypes ---@param quant number ---@param reason string ---@return boolean From 927e0709156f2fb3d98a5126ac56e424e377565f Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:09:09 +0100 Subject: [PATCH 03/13] =?UTF-8?q?=F0=9F=94=81=20Renamed=20`TransferTo`=20f?= =?UTF-8?q?unction=20in=20Player=20object=20to=20`TransferMoneyTo`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/player.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/player.lua b/server/player.lua index 9c3600ace..831dbccbe 100644 --- a/server/player.lua +++ b/server/player.lua @@ -388,7 +388,7 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline) return true end - function self.Functions.TransferTo(emitermoneytype, receivercid, receivermoneytype, quant, reason) + function self.Functions.TransferMoneyTo(emitermoneytype, receivercid, receivermoneytype, quant, reason) local ReceiverPlayer = QBCore.Functions.GetPlayerByCitizenId(receivercid) if not tonumber(quant) then return false end quant = tonumber(quant) or 0 From 67a355d3151b2d42b1dceaa272d320c1e6f8e368 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 20 Jul 2024 20:59:56 +0100 Subject: [PATCH 04/13] Refactor money transfer function for clarity and consistency --- server/functions.lua | 51 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index 5147f095c..6f02247fb 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -704,47 +704,48 @@ function QBCore.Functions.PrepForSQL(source, data, pattern) end ---Do a money transactio between players ----@param emitercid string ----@param emitermoneytype string -- Only money types in QBConfig.Money.MoneyTypes ----@param receivercid string ----@param receivermoneytype string -- Only money types in QBConfig.Money.MoneyTypes ----@param quant number +---@param sourcecid string +---@param sourcemoneytype string -- Only money types in QBConfig.Money.MoneyTypes +---@param targetcid string +---@param targetmoneytype string -- Only money types in QBConfig.Money.MoneyTypes +---@param amount number ---@param reason string ---@return boolean -function QBCore.Functions.TransferMoney(emitercid, emitermoneytype, receivercid, receivermoneytype, quant, reason) - local EmiterPlayer = QBCore.Functions.GetPlayerByCitizenId(emitercid) - local ReceiverPlayer = QBCore.Functions.GetPlayerByCitizenId(receivercid) - if not tonumber(quant) then return false end - quant = tonumber(quant) or 0 +function QBCore.Functions.TransferMoney(sourcecid, sourcemoneytype, targetcid, targetmoneytype, amount, reason) + local SourcePlayer = QBCore.Functions.GetPlayerByCitizenId(sourcecid) + local TargetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetcid) + if not tonumber(amount) then return false end + amount = tonumber(amount) or 0 + if tonumber(amount) <= 0 then return true end local errorOnLast = false - if EmiterPlayer then - if not EmiterPlayer.Functions.RemoveMoney(quant, emitermoneytype, reason) then return false end + if SourcePlayer then + if not SourcePlayer.Functions.RemoveMoney(amount, sourcemoneytype, reason) then return false end else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { emitercid }) + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { sourcecid }) if not result then return false end result = json.decode(result) - result[emitermoneytype] -= quant - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), emitercid }) then return false end + result[sourcemoneytype] -= amount + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), sourcecid }) then errorOnLast = true end end - if ReceiverPlayer then - if not ReceiverPlayer.Functions.AddMoney(quant, receivermoneytype, reason) then errorOnLast = true end + if TargetPlayer then + if not TargetPlayer.Functions.AddMoney(amount, targetmoneytype, reason) then errorOnLast = true end else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { receivercid }) + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { targetcid }) if not result then errorOnLast = true end result = json.decode(result) - result[receivermoneytype] += quant - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), receivercid }) then return false end + result[targetmoneytype] += amount + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), targetcid }) then errorOnLast = true end end if errorOnLast then - if EmiterPlayer then - if not EmiterPlayer.Functions.AddMoney(quant, emitermoneytype, reason) then return false end + if SourcePlayer then + if not SourcePlayer.Functions.AddMoney(amount, sourcemoneytype, reason) then return false end else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { emitercid }) + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { sourcecid }) if not result then return false end result = json.decode(result) - result[emitermoneytype] += quant - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), emitercid }) then return false end + result[sourcemoneytype] += amount + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), sourcecid }) then return false end end return false end From e2e47881b5464dc85819b874d3239270e6b59d84 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 20 Jul 2024 21:00:00 +0100 Subject: [PATCH 05/13] chore: Refactor money transfer function for clarity and consistency --- server/player.lua | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/server/player.lua b/server/player.lua index 925f63636..90da6ae24 100644 --- a/server/player.lua +++ b/server/player.lua @@ -337,24 +337,25 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline) return true end - function self.Functions.TransferMoneyTo(emitermoneytype, receivercid, receivermoneytype, quant, reason) - local ReceiverPlayer = QBCore.Functions.GetPlayerByCitizenId(receivercid) - if not tonumber(quant) then return false end - quant = tonumber(quant) or 0 + function self.Functions.TransferMoneyTo(sourcemoneytype, targetcid, targetmoneytype, amount, reason) + local TargetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetcid) + if not tonumber(amount) then return false end + amount = tonumber(amount) or 0 + if amount <= 0 then return true end local errorOnLast = false - if not self.Functions.RemoveMoney(quant, emitermoneytype, reason) then return false end - if ReceiverPlayer then - if not ReceiverPlayer.Functions.AddMoney(quant, receivermoneytype, reason) then errorOnLast = true end + if not self.Functions.RemoveMoney(amount, sourcemoneytype, reason) then return false end + if TargetPlayer then + if not TargetPlayer.Functions.AddMoney(amount, targetmoneytype, reason) then errorOnLast = true end else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { receivercid }) + local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { targetcid }) if not result then errorOnLast = true end result = json.decode(result) - result[receivermoneytype] += quant - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), receivercid }) then return false end + result[targetmoneytype] += amount + if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), targetcid }) then errorOnLast = true end end if errorOnLast then - self.Functions.AddMoney(quant, emitermoneytype, reason) + self.Functions.AddMoney(amount, sourcemoneytype, reason) return false end return true From 16c662f2794deb8fb12325c53fb3df1e1bf5a723 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 20 Jul 2024 21:17:30 +0100 Subject: [PATCH 06/13] feat: Add discord field to players table --- qbcore.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/qbcore.sql b/qbcore.sql index ee0d6d81a..a0d62ed6d 100644 --- a/qbcore.sql +++ b/qbcore.sql @@ -3,6 +3,7 @@ CREATE TABLE IF NOT EXISTS `players` ( `citizenid` varchar(50) NOT NULL, `cid` int(11) DEFAULT NULL, `license` varchar(255) NOT NULL, + `discord` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `money` text NOT NULL, `charinfo` text DEFAULT NULL, From 90f39666b207fb56467ddd8b5e111c5373ab7a11 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 20 Jul 2024 21:17:34 +0100 Subject: [PATCH 07/13] feat: Add discord field to players table --- server/player.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/player.lua b/server/player.lua index 90da6ae24..f9db1db36 100644 --- a/server/player.lua +++ b/server/player.lua @@ -97,6 +97,7 @@ function QBCore.Player.CheckPlayerData(source, PlayerData) if source then PlayerData.source = source PlayerData.license = PlayerData.license or QBCore.Functions.GetIdentifier(source, 'license') + PlayerData.discord = PlayerData.discord or QBCore.Functions.GetIdentifier(source, 'discord'):sub(9) PlayerData.name = GetPlayerName(source) end @@ -461,10 +462,11 @@ function QBCore.Player.Save(source) local pcoords = GetEntityCoords(ped) local PlayerData = QBCore.Players[source].PlayerData if PlayerData then - MySQL.insert('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { + MySQL.insert('INSERT INTO players (citizenid, cid, license, discord, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :discord, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { citizenid = PlayerData.citizenid, cid = tonumber(PlayerData.cid), license = PlayerData.license, + discord = PlayerData.discord, name = PlayerData.name, money = json.encode(PlayerData.money), charinfo = json.encode(PlayerData.charinfo), @@ -482,10 +484,11 @@ end function QBCore.Player.SaveOffline(PlayerData) if PlayerData then - MySQL.insert('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { + MySQL.insert('INSERT INTO players (citizenid, cid, license, discord, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :discord, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { citizenid = PlayerData.citizenid, cid = tonumber(PlayerData.cid), license = PlayerData.license, + discord = PlayerData.discord, name = PlayerData.name, money = json.encode(PlayerData.money), charinfo = json.encode(PlayerData.charinfo), From 07c79275d95b25dfc6cbd1b6242545313e7c0185 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sun, 21 Jul 2024 17:42:13 +0100 Subject: [PATCH 08/13] Revert "feat: Add discord field to players table" This reverts commit 16c662f2794deb8fb12325c53fb3df1e1bf5a723. --- qbcore.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/qbcore.sql b/qbcore.sql index a0d62ed6d..ee0d6d81a 100644 --- a/qbcore.sql +++ b/qbcore.sql @@ -3,7 +3,6 @@ CREATE TABLE IF NOT EXISTS `players` ( `citizenid` varchar(50) NOT NULL, `cid` int(11) DEFAULT NULL, `license` varchar(255) NOT NULL, - `discord` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `money` text NOT NULL, `charinfo` text DEFAULT NULL, From a689f374bd4c4ca23f0b68faa7d9b77473b7f859 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sun, 21 Jul 2024 17:42:18 +0100 Subject: [PATCH 09/13] Revert "feat: Add discord field to players table" This reverts commit 90f39666b207fb56467ddd8b5e111c5373ab7a11. --- server/player.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/player.lua b/server/player.lua index f9db1db36..90da6ae24 100644 --- a/server/player.lua +++ b/server/player.lua @@ -97,7 +97,6 @@ function QBCore.Player.CheckPlayerData(source, PlayerData) if source then PlayerData.source = source PlayerData.license = PlayerData.license or QBCore.Functions.GetIdentifier(source, 'license') - PlayerData.discord = PlayerData.discord or QBCore.Functions.GetIdentifier(source, 'discord'):sub(9) PlayerData.name = GetPlayerName(source) end @@ -462,11 +461,10 @@ function QBCore.Player.Save(source) local pcoords = GetEntityCoords(ped) local PlayerData = QBCore.Players[source].PlayerData if PlayerData then - MySQL.insert('INSERT INTO players (citizenid, cid, license, discord, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :discord, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { + MySQL.insert('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { citizenid = PlayerData.citizenid, cid = tonumber(PlayerData.cid), license = PlayerData.license, - discord = PlayerData.discord, name = PlayerData.name, money = json.encode(PlayerData.money), charinfo = json.encode(PlayerData.charinfo), @@ -484,11 +482,10 @@ end function QBCore.Player.SaveOffline(PlayerData) if PlayerData then - MySQL.insert('INSERT INTO players (citizenid, cid, license, discord, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :discord, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { + MySQL.insert('INSERT INTO players (citizenid, cid, license, name, money, charinfo, job, gang, position, metadata) VALUES (:citizenid, :cid, :license, :name, :money, :charinfo, :job, :gang, :position, :metadata) ON DUPLICATE KEY UPDATE cid = :cid, name = :name, money = :money, charinfo = :charinfo, job = :job, gang = :gang, position = :position, metadata = :metadata', { citizenid = PlayerData.citizenid, cid = tonumber(PlayerData.cid), license = PlayerData.license, - discord = PlayerData.discord, name = PlayerData.name, money = json.encode(PlayerData.money), charinfo = json.encode(PlayerData.charinfo), From e67d7e3115bece786ae1d9273b22b191d1607299 Mon Sep 17 00:00:00 2001 From: Cocodrulo <142546774+Cocodrulo@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:34:17 +0100 Subject: [PATCH 10/13] chore: Added logs and money control events --- server/functions.lua | 23 +++++++++++++++++++++++ server/player.lua | 17 +++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/server/functions.lua b/server/functions.lua index 6f02247fb..cd9996174 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -749,5 +749,28 @@ function QBCore.Functions.TransferMoney(sourcecid, sourcemoneytype, targetcid, t end return false end + + if SourcePlayer then + TriggerClientEvent('hud:client:OnMoneyChange', SourcePlayer.PlayerData.source, sourcemoneytype, true) + TriggerClientEvent('QBCore:Client:OnMoneyChange', SourcePlayer.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) + TriggerEvent('QBCore:Server:OnMoneyChange', SourcePlayer.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) + end + + if TargetPlayer then + TriggerClientEvent('hud:client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, true) + TriggerClientEvent('QBCore:Client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) + TriggerEvent('QBCore:Server:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) + end + + if not SourcePlayer and not TargetPlayer then + TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. sourcecid .. '** gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. targetcid .. '** reason: ' .. reason .. ' | (Both offline)') + elseif not TargetPlayer and SourcePlayer then + TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(SourcePlayer.PlayerData.source) .. ' (citizenid: ' .. SourcePlayer.PlayerData.citizenid .. ' | id: ' .. SourcePlayer.PlayerData.source .. ')**, new balance: ' .. SourcePlayer.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. targetcid .. ' in ('..targetmoneytype..') reason: ' .. reason .. ' | (Target offline)') + elseif not SourcePlayer and TargetPlayer then + TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. sourcecid .. '** gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. GetPlayerName(TargetPlayer.PlayerData.source) .. ' (citizenid: ' .. TargetPlayer.PlayerData.citizenid .. ' | id: ' .. TargetPlayer.PlayerData.source .. ')**, new balance: ' .. TargetPlayer.PlayerData.money[targetmoneytype] .. ' in ('..targetmoneytype..') reason: ' .. reason .. ' | (Source offline)') + elseif SourcePlayer and TargetPlayer then + TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(SourcePlayer.PlayerData.source) .. ' (citizenid: ' .. SourcePlayer.PlayerData.citizenid .. ' | id: ' .. SourcePlayer.PlayerData.source .. ')**, new balance: ' .. SourcePlayer.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. GetPlayerName(TargetPlayer.PlayerData.source) .. ' (citizenid: ' .. TargetPlayer.PlayerData.citizenid .. ' | id: ' .. TargetPlayer.PlayerData.source .. ')**, new balance: ' .. TargetPlayer.PlayerData.money[targetmoneytype] .. ' in ('..targetmoneytype..') reason: ' .. reason) + end + return true end diff --git a/server/player.lua b/server/player.lua index 90da6ae24..4206c050c 100644 --- a/server/player.lua +++ b/server/player.lua @@ -358,6 +358,23 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline) self.Functions.AddMoney(amount, sourcemoneytype, reason) return false end + + TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, sourcemoneytype, true) + TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) + TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) + + if TargetPlayer then + TriggerClientEvent('hud:client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, true) + TriggerClientEvent('QBCore:Client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) + TriggerEvent('QBCore:Server:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) + end + + if not TargetPlayer then + TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')**, new balance: ' .. self.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. targetcid .. ' in ('..targetmoneytype..') reason: ' .. reason .. ' | (Target offline)') + elseif TargetPlayer then + TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')**, new balance: ' .. self.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. GetPlayerName(TargetPlayer.PlayerData.source) .. ' (citizenid: ' .. TargetPlayer.PlayerData.citizenid .. ' | id: ' .. TargetPlayer.PlayerData.source .. ')**, new balance: ' .. TargetPlayer.PlayerData.money[targetmoneytype] .. ' in ('..targetmoneytype..') reason: ' .. reason) + end + return true end From 036fd25039dd865ec8fde94d93ba050876e6e4d0 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 28 Dec 2024 16:44:10 +0000 Subject: [PATCH 11/13] intuit items properties from other data of the item (name, image, type) and added default value in case a property does not exist --- shared/items.lua | 661 ++++++++++++++++++++++++----------------------- 1 file changed, 339 insertions(+), 322 deletions(-) diff --git a/shared/items.lua b/shared/items.lua index b6f93a89a..d67a2d8a5 100644 --- a/shared/items.lua +++ b/shared/items.lua @@ -1,385 +1,402 @@ QBShared = QBShared or {} -QBShared.Items = { +local Items = { + -- WEAPONS -- Melee - weapon_unarmed = { name = 'weapon_unarmed', label = 'Fists', weight = 1000, type = 'weapon', ammotype = nil, image = 'placeholder.png', unique = true, useable = false, description = 'Fisticuffs' }, - weapon_dagger = { name = 'weapon_dagger', label = 'Dagger', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_dagger.png', unique = true, useable = false, description = 'A short knife with a pointed and edged blade, used as a weapon' }, - weapon_bat = { name = 'weapon_bat', label = 'Bat', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_bat.png', unique = true, useable = false, description = 'Used for hitting a ball in sports (or other things)' }, - weapon_bottle = { name = 'weapon_bottle', label = 'Broken Bottle', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_bottle.png', unique = true, useable = false, description = 'A broken bottle' }, - weapon_crowbar = { name = 'weapon_crowbar', label = 'Crowbar', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_crowbar.png', unique = true, useable = false, description = 'An iron bar with a flattened end, used as a lever' }, - weapon_flashlight = { name = 'weapon_flashlight', label = 'Flashlight', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_flashlight.png', unique = true, useable = false, description = 'A battery-operated portable light' }, - weapon_golfclub = { name = 'weapon_golfclub', label = 'Golfclub', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_golfclub.png', unique = true, useable = false, description = 'A club used to hit the ball in golf' }, - weapon_hammer = { name = 'weapon_hammer', label = 'Hammer', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_hammer.png', unique = true, useable = false, description = 'Used for jobs such as breaking things (legs) and driving in nails' }, - weapon_hatchet = { name = 'weapon_hatchet', label = 'Hatchet', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_hatchet.png', unique = true, useable = false, description = 'A small axe with a short handle for use in one hand' }, - weapon_knuckle = { name = 'weapon_knuckle', label = 'Knuckle', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_knuckle.png', unique = true, useable = false, description = 'A metal guard worn over the knuckles in fighting, especially to increase the effect of the blows' }, - weapon_knife = { name = 'weapon_knife', label = 'Knife', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_knife.png', unique = true, useable = false, description = 'An instrument composed of a blade fixed into a handle, used for cutting or as a weapon' }, - weapon_machete = { name = 'weapon_machete', label = 'Machete', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_machete.png', unique = true, useable = false, description = 'A broad, heavy knife used as a weapon' }, - weapon_switchblade = { name = 'weapon_switchblade', label = 'Switchblade', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_switchblade.png', unique = true, useable = false, description = 'A knife with a blade that springs out from the handle when a button is pressed' }, - weapon_nightstick = { name = 'weapon_nightstick', label = 'Nightstick', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_nightstick.png', unique = true, useable = false, description = 'A police officer\'s club or billy' }, - weapon_wrench = { name = 'weapon_wrench', label = 'Wrench', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_wrench.png', unique = true, useable = false, description = 'A tool used for gripping and turning nuts, bolts, pipes, etc' }, - weapon_battleaxe = { name = 'weapon_battleaxe', label = 'Battle Axe', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_battleaxe.png', unique = true, useable = false, description = 'A large broad-bladed axe used in ancient warfare' }, - weapon_poolcue = { name = 'weapon_poolcue', label = 'Poolcue', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_poolcue.png', unique = true, useable = false, description = 'A stick used to strike a ball, usually the cue ball (or other things)' }, - weapon_briefcase = { name = 'weapon_briefcase', label = 'Briefcase', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_briefcase.png', unique = true, useable = false, description = 'A briefcase for storing important documents' }, - weapon_briefcase_02 = { name = 'weapon_briefcase_02', label = 'Suitcase', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_briefcase2.png', unique = true, useable = false, description = 'Wonderfull for nice vacation to Liberty City' }, - weapon_garbagebag = { name = 'weapon_garbagebag', label = 'Garbage Bag', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_garbagebag.png', unique = true, useable = false, description = 'A garbage bag' }, - weapon_handcuffs = { name = 'weapon_handcuffs', label = 'Handcuffs', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_handcuffs.png', unique = true, useable = false, description = 'A pair of lockable linked metal rings for securing a prisoner\'s wrists' }, - weapon_bread = { name = 'weapon_bread', label = 'Baquette', weight = 1000, type = 'weapon', ammotype = nil, image = 'baquette.png', unique = true, useable = false, description = 'Bread...?' }, - weapon_stone_hatchet = { name = 'weapon_stone_hatchet', label = 'Stone Hatchet', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_stone_hatchet.png', unique = true, useable = true, description = 'Stone Hatchet' }, - weapon_candycane = { name = 'weapon_candycane', label = 'Candy Cane', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_candycane', unique = true, useable = true, description = 'Candy Cane' }, + weapon_unarmed = { label = 'Fists', weight = 1000, type = 'weapon', image = 'placeholder.png', unique = true, description = 'Fisticuffs' }, + weapon_dagger = { label = 'Dagger', weight = 1000, type = 'weapon', unique = true, description = 'A short knife with a pointed and edged blade, used as a weapon' }, + weapon_bat = { label = 'Bat', weight = 1000, type = 'weapon', unique = true, description = 'Used for hitting a ball in sports (or other things)' }, + weapon_bottle = { label = 'Broken Bottle', weight = 1000, type = 'weapon', unique = true, description = 'A broken bottle' }, + weapon_crowbar = { label = 'Crowbar', weight = 1000, type = 'weapon', unique = true, description = 'An iron bar with a flattened end, used as a lever' }, + weapon_flashlight = { label = 'Flashlight', weight = 1000, type = 'weapon', unique = true, description = 'A battery-operated portable light' }, + weapon_golfclub = { label = 'Golfclub', weight = 1000, type = 'weapon', unique = true, description = 'A club used to hit the ball in golf' }, + weapon_hammer = { label = 'Hammer', weight = 1000, type = 'weapon', unique = true, description = 'Used for jobs such as breaking things (legs) and driving in nails' }, + weapon_hatchet = { label = 'Hatchet', weight = 1000, type = 'weapon', unique = true, description = 'A small axe with a short handle for use in one hand' }, + weapon_knuckle = { label = 'Knuckle', weight = 1000, type = 'weapon', unique = true, description = 'A metal guard worn over the knuckles in fighting, especially to increase the effect of the blows' }, + weapon_knife = { label = 'Knife', weight = 1000, type = 'weapon', unique = true, description = 'An instrument composed of a blade fixed into a handle, used for cutting or as a weapon' }, + weapon_machete = { label = 'Machete', weight = 1000, type = 'weapon', unique = true, description = 'A broad, heavy knife used as a weapon' }, + weapon_switchblade = { label = 'Switchblade', weight = 1000, type = 'weapon', unique = true, description = 'A knife with a blade that springs out from the handle when a button is pressed' }, + weapon_nightstick = { label = 'Nightstick', weight = 1000, type = 'weapon', unique = true, description = 'A police officer\'s club or billy' }, + weapon_wrench = { label = 'Wrench', weight = 1000, type = 'weapon', unique = true, description = 'A tool used for gripping and turning nuts, bolts, pipes, etc' }, + weapon_battleaxe = { label = 'Battle Axe', weight = 1000, type = 'weapon', unique = true, description = 'A large broad-bladed axe used in ancient warfare' }, + weapon_poolcue = { label = 'Poolcue', weight = 1000, type = 'weapon', unique = true, description = 'A stick used to strike a ball, usually the cue ball (or other things)' }, + weapon_briefcase = { label = 'Briefcase', weight = 1000, type = 'weapon', unique = true, description = 'A briefcase for storing important documents' }, + weapon_briefcase_02 = { label = 'Suitcase', weight = 1000, type = 'weapon', image = 'weapon_briefcase2.png', unique = true, description = 'Wonderfull for nice vacation to Liberty City' }, + weapon_garbagebag = { label = 'Garbage Bag', weight = 1000, type = 'weapon', unique = true, description = 'A garbage bag' }, + weapon_handcuffs = { label = 'Handcuffs', weight = 1000, type = 'weapon', unique = true, description = 'A pair of lockable linked metal rings for securing a prisoner\'s wrists' }, + weapon_bread = { label = 'Baquette', weight = 1000, type = 'weapon', image = 'baquette.png', unique = true, description = 'Bread...?' }, + weapon_stone_hatchet = { label = 'Stone Hatchet', weight = 1000, type = 'weapon', unique = true, useable = true, description = 'Stone Hatchet' }, + weapon_candycane = { label = 'Candy Cane', weight = 1000, type = 'weapon', image = 'weapon_candycane', unique = true, useable = true, description = 'Candy Cane' }, -- Handguns - weapon_pistol = { name = 'weapon_pistol', label = 'Walther P99', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_pistol.png', unique = true, useable = false, description = 'A small firearm designed to be held in one hand' }, - weapon_pistol_mk2 = { name = 'weapon_pistol_mk2', label = 'Pistol Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_pistol_mk2.png', unique = true, useable = false, description = 'An upgraded small firearm designed to be held in one hand' }, - weapon_combatpistol = { name = 'weapon_combatpistol', label = 'Combat Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_combatpistol.png', unique = true, useable = false, description = 'A combat version small firearm designed to be held in one hand' }, - weapon_appistol = { name = 'weapon_appistol', label = 'AP Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_appistol.png', unique = true, useable = false, description = 'A small firearm designed to be held in one hand that is automatic' }, - weapon_stungun = { name = 'weapon_stungun', label = 'Taser', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_stungun.png', unique = true, useable = false, description = 'A weapon firing barbs attached by wires to batteries, causing temporary paralysis' }, - weapon_pistol50 = { name = 'weapon_pistol50', label = 'Pistol .50', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_pistol50.png', unique = true, useable = false, description = 'A .50 caliber firearm designed to be held with both hands' }, - weapon_snspistol = { name = 'weapon_snspistol', label = 'SNS Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_snspistol.png', unique = true, useable = false, description = 'A very small firearm designed to be easily concealed' }, - weapon_heavypistol = { name = 'weapon_heavypistol', label = 'Heavy Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_heavypistol.png', unique = true, useable = false, description = 'A hefty firearm designed to be held in one hand (or attempted)' }, - weapon_vintagepistol = { name = 'weapon_vintagepistol', label = 'Vintage Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_vintagepistol.png', unique = true, useable = false, description = 'An antique firearm designed to be held in one hand' }, - weapon_flaregun = { name = 'weapon_flaregun', label = 'Flare Gun', weight = 1000, type = 'weapon', ammotype = 'AMMO_FLARE', image = 'weapon_flaregun.png', unique = true, useable = false, description = 'A handgun for firing signal rockets' }, - weapon_marksmanpistol = { name = 'weapon_marksmanpistol', label = 'Marksman Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_marksmanpistol.png', unique = true, useable = false, description = 'A very accurate small firearm designed to be held in one hand' }, - weapon_revolver = { name = 'weapon_revolver', label = 'Revolver', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_revolver.png', unique = true, useable = false, description = 'A pistol with revolving chambers enabling several shots to be fired without reloading' }, - weapon_revolver_mk2 = { name = 'weapon_revolver_mk2', label = 'Violence', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_revolver_mk2.png', unique = true, useable = true, description = 'da Violence' }, - weapon_doubleaction = { name = 'weapon_doubleaction', label = 'Double Action Revolver', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_doubleaction.png', unique = true, useable = true, description = 'Double Action Revolver' }, - weapon_snspistol_mk2 = { name = 'weapon_snspistol_mk2', label = 'SNS Pistol Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_snspistol_mk2.png', unique = true, useable = true, description = 'SNS Pistol MK2' }, - weapon_raypistol = { name = 'weapon_raypistol', label = 'Up-n-Atomizer', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_raypistol.png', unique = true, useable = true, description = 'Weapon Raypistol' }, - weapon_ceramicpistol = { name = 'weapon_ceramicpistol', label = 'Ceramic Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ceramicpistol.png', unique = true, useable = true, description = 'Weapon Ceramicpistol' }, - weapon_navyrevolver = { name = 'weapon_navyrevolver', label = 'Navy Revolver', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_navyrevolver.png', unique = true, useable = true, description = 'Weapon Navyrevolver' }, - weapon_gadgetpistol = { name = 'weapon_gadgetpistol', label = 'Perico Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_gadgetpistol.png', unique = true, useable = true, description = 'Weapon Gadgetpistol' }, - weapon_pistolxm3 = { name = 'weapon_pistolxm3', label = 'Pistol XM3', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_pistolxm3.png', unique = true, useable = true, description = 'Pistol XM3' }, + weapon_pistol = { label = 'Walther P99', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A small firearm designed to be held in one hand' }, + weapon_pistol_mk2 = { label = 'Pistol Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'An upgraded small firearm designed to be held in one hand' }, + weapon_combatpistol = { label = 'Combat Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A combat version small firearm designed to be held in one hand' }, + weapon_appistol = { label = 'AP Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A small firearm designed to be held in one hand that is automatic' }, + weapon_stungun = { label = 'Taser', weight = 1000, type = 'weapon', unique = true, description = 'A weapon firing barbs attached by wires to batteries, causing temporary paralysis' }, + weapon_pistol50 = { label = 'Pistol .50', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A .50 caliber firearm designed to be held with both hands' }, + weapon_snspistol = { label = 'SNS Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A very small firearm designed to be easily concealed' }, + weapon_heavypistol = { label = 'Heavy Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A hefty firearm designed to be held in one hand (or attempted)' }, + weapon_vintagepistol = { label = 'Vintage Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'An antique firearm designed to be held in one hand' }, + weapon_flaregun = { label = 'Flare Gun', weight = 1000, type = 'weapon', ammotype = 'AMMO_FLARE', unique = true, description = 'A handgun for firing signal rockets' }, + weapon_marksmanpistol = { label = 'Marksman Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A very accurate small firearm designed to be held in one hand' }, + weapon_revolver = { label = 'Revolver', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A pistol with revolving chambers enabling several shots to be fired without reloading' }, + weapon_revolver_mk2 = { label = 'Violence', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'da Violence' }, + weapon_doubleaction = { label = 'Double Action Revolver', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'Double Action Revolver' }, + weapon_snspistol_mk2 = { label = 'SNS Pistol Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'SNS Pistol MK2' }, + weapon_raypistol = { label = 'Up-n-Atomizer', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'Weapon Raypistol' }, + weapon_ceramicpistol = { label = 'Ceramic Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'Weapon Ceramicpistol' }, + weapon_navyrevolver = { label = 'Navy Revolver', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'Weapon Navyrevolver' }, + weapon_gadgetpistol = { label = 'Perico Pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'Weapon Gadgetpistol' }, + weapon_pistolxm3 = { label = 'Pistol XM3', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, useable = true, description = 'Pistol XM3' }, -- Submachine Guns - weapon_microsmg = { name = 'weapon_microsmg', label = 'Micro SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_microsmg.png', unique = true, useable = false, description = 'A handheld light weight machine gun' }, - weapon_smg = { name = 'weapon_smg', label = 'SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_smg.png', unique = true, useable = false, description = 'A handheld light weight machine gun' }, - weapon_smg_mk2 = { name = 'weapon_smg_mk2', label = 'SMG Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_smg_mk2.png', unique = true, useable = true, description = 'SMG MK2' }, - weapon_assaultsmg = { name = 'weapon_assaultsmg', label = 'Assault SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_assaultsmg.png', unique = true, useable = false, description = 'An assault version of a handheld light weight machine gun' }, - weapon_combatpdw = { name = 'weapon_combatpdw', label = 'Combat PDW', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_combatpdw.png', unique = true, useable = false, description = 'A combat version of a handheld light weight machine gun' }, - weapon_machinepistol = { name = 'weapon_machinepistol', label = 'Tec-9', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_machinepistol.png', unique = true, useable = false, description = 'A self-loading pistol capable of burst or fully automatic fire' }, - weapon_minismg = { name = 'weapon_minismg', label = 'Mini SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_minismg.png', unique = true, useable = false, description = 'A mini handheld light weight machine gun' }, - weapon_raycarbine = { name = 'weapon_raycarbine', label = 'Unholy Hellbringer', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', image = 'weapon_raycarbine.png', unique = true, useable = true, description = 'Weapon Raycarbine' }, + weapon_microsmg = { label = 'Micro SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, description = 'A handheld light weight machine gun' }, + weapon_smg = { label = 'SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, description = 'A handheld light weight machine gun' }, + weapon_smg_mk2 = { label = 'SMG Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, useable = true, description = 'SMG MK2' }, + weapon_assaultsmg = { label = 'Assault SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, description = 'An assault version of a handheld light weight machine gun' }, + weapon_combatpdw = { label = 'Combat PDW', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, description = 'A combat version of a handheld light weight machine gun' }, + weapon_machinepistol = { label = 'Tec-9', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', unique = true, description = 'A self-loading pistol capable of burst or fully automatic fire' }, + weapon_minismg = { label = 'Mini SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, description = 'A mini handheld light weight machine gun' }, + weapon_raycarbine = { label = 'Unholy Hellbringer', weight = 1000, type = 'weapon', ammotype = 'AMMO_SMG', unique = true, useable = true, description = 'Weapon Raycarbine' }, -- Shotguns - weapon_pumpshotgun = { name = 'weapon_pumpshotgun', label = 'Pump Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_pumpshotgun.png', unique = true, useable = false, description = 'A pump-action smoothbore gun for firing small shot at short range' }, - weapon_sawnoffshotgun = { name = 'weapon_sawnoffshotgun', label = 'Sawn-off Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_sawnoffshotgun.png', unique = true, useable = false, description = 'A sawn-off smoothbore gun for firing small shot at short range' }, - weapon_assaultshotgun = { name = 'weapon_assaultshotgun', label = 'Assault Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_assaultshotgun.png', unique = true, useable = false, description = 'An assault version of asmoothbore gun for firing small shot at short range' }, - weapon_bullpupshotgun = { name = 'weapon_bullpupshotgun', label = 'Bullpup Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_bullpupshotgun.png', unique = true, useable = false, description = 'A compact smoothbore gun for firing small shot at short range' }, - weapon_musket = { name = 'weapon_musket', label = 'Musket', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_musket.png', unique = true, useable = false, description = 'An infantryman\'s light gun with a long barrel, typically smooth-bored, muzzleloading, and fired from the shoulder' }, - weapon_heavyshotgun = { name = 'weapon_heavyshotgun', label = 'Heavy Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_heavyshotgun.png', unique = true, useable = false, description = 'A large smoothbore gun for firing small shot at short range' }, - weapon_dbshotgun = { name = 'weapon_dbshotgun', label = 'Double-barrel Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_dbshotgun.png', unique = true, useable = false, description = 'A shotgun with two parallel barrels, allowing two single shots to be fired in quick succession' }, - weapon_autoshotgun = { name = 'weapon_autoshotgun', label = 'Auto Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_autoshotgun.png', unique = true, useable = false, description = 'A shotgun capable of rapid continous fire' }, - weapon_pumpshotgun_mk2 = { name = 'weapon_pumpshotgun_mk2', label = 'Pumpshotgun Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_pumpshotgun_mk2.png', unique = true, useable = true, description = 'Pumpshotgun MK2' }, - weapon_combatshotgun = { name = 'weapon_combatshotgun', label = 'Combat Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', image = 'weapon_combatshotgun.png', unique = true, useable = true, description = 'Weapon Combatshotgun' }, + weapon_pumpshotgun = { label = 'Pump Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'A pump-action smoothbore gun for firing small shot at short range' }, + weapon_sawnoffshotgun = { label = 'Sawn-off Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'A sawn-off smoothbore gun for firing small shot at short range' }, + weapon_assaultshotgun = { label = 'Assault Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'An assault version of asmoothbore gun for firing small shot at short range' }, + weapon_bullpupshotgun = { label = 'Bullpup Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'A compact smoothbore gun for firing small shot at short range' }, + weapon_musket = { label = 'Musket', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'An infantryman\'s light gun with a long barrel, typically smooth-bored, muzzleloading, and fired from the shoulder' }, + weapon_heavyshotgun = { label = 'Heavy Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'A large smoothbore gun for firing small shot at short range' }, + weapon_dbshotgun = { label = 'Double-barrel Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'A shotgun with two parallel barrels, allowing two single shots to be fired in quick succession' }, + weapon_autoshotgun = { label = 'Auto Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, description = 'A shotgun capable of rapid continous fire' }, + weapon_pumpshotgun_mk2 = { label = 'Pumpshotgun Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, useable = true, description = 'Pumpshotgun MK2' }, + weapon_combatshotgun = { label = 'Combat Shotgun', weight = 1000, type = 'weapon', ammotype = 'AMMO_SHOTGUN', unique = true, useable = true, description = 'Weapon Combatshotgun' }, -- Assault Rifles - weapon_assaultrifle = { name = 'weapon_assaultrifle', label = 'Assault Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_assaultrifle.png', unique = true, useable = false, description = 'A rapid-fire, magazine-fed automatic rifle designed for infantry use' }, - weapon_assaultrifle_mk2 = { name = 'weapon_assaultrifle_mk2', label = 'Assault Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_assaultrifle_mk2.png', unique = true, useable = true, description = 'Assault Rifle MK2' }, - weapon_carbinerifle = { name = 'weapon_carbinerifle', label = 'Carbine Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_carbinerifle.png', unique = true, useable = false, description = 'A light weight automatic rifle' }, - weapon_carbinerifle_mk2 = { name = 'weapon_carbinerifle_mk2', label = 'Carbine Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_carbinerifle_mk2.png', unique = true, useable = true, description = 'Carbine Rifle MK2' }, - weapon_advancedrifle = { name = 'weapon_advancedrifle', label = 'Advanced Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_advancedrifle.png', unique = true, useable = false, description = 'An assault version of a rapid-fire, magazine-fed automatic rifle designed for infantry use' }, - weapon_specialcarbine = { name = 'weapon_specialcarbine', label = 'Special Carbine', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_specialcarbine.png', unique = true, useable = false, description = 'An extremely versatile assault rifle for any combat situation' }, - weapon_bullpuprifle = { name = 'weapon_bullpuprifle', label = 'Bullpup Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_bullpuprifle.png', unique = true, useable = false, description = 'A compact automatic assault rifle' }, - weapon_compactrifle = { name = 'weapon_compactrifle', label = 'Compact Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_compactrifle.png', unique = true, useable = false, description = 'A compact version of an assault rifle' }, - weapon_specialcarbine_mk2 = { name = 'weapon_specialcarbine_mk2', label = 'Special Carbine Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_specialcarbine_mk2.png', unique = true, useable = true, description = 'Weapon Wpecialcarbine MK2' }, - weapon_bullpuprifle_mk2 = { name = 'weapon_bullpuprifle_mk2', label = 'Bullpup Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_bullpuprifle_mk2.png', unique = true, useable = true, description = 'Bull Puprifle MK2' }, - weapon_militaryrifle = { name = 'weapon_militaryrifle', label = 'Military Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', image = 'weapon_militaryrifle.png', unique = true, useable = true, description = 'Weapon Militaryrifle' }, + weapon_assaultrifle = { label = 'Assault Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, description = 'A rapid-fire, magazine-fed automatic rifle designed for infantry use' }, + weapon_assaultrifle_mk2 = { label = 'Assault Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, useable = true, description = 'Assault Rifle MK2' }, + weapon_carbinerifle = { label = 'Carbine Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, description = 'A light weight automatic rifle' }, + weapon_carbinerifle_mk2 = { label = 'Carbine Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, useable = true, description = 'Carbine Rifle MK2' }, + weapon_advancedrifle = { label = 'Advanced Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, description = 'An assault version of a rapid-fire, magazine-fed automatic rifle designed for infantry use' }, + weapon_specialcarbine = { label = 'Special Carbine', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, description = 'An extremely versatile assault rifle for any combat situation' }, + weapon_bullpuprifle = { label = 'Bullpup Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, description = 'A compact automatic assault rifle' }, + weapon_compactrifle = { label = 'Compact Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, description = 'A compact version of an assault rifle' }, + weapon_specialcarbine_mk2 = { label = 'Special Carbine Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, useable = true, description = 'Weapon Wpecialcarbine MK2' }, + weapon_bullpuprifle_mk2 = { label = 'Bullpup Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, useable = true, description = 'Bull Puprifle MK2' }, + weapon_militaryrifle = { label = 'Military Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_RIFLE', unique = true, useable = true, description = 'Weapon Militaryrifle' }, -- Light Machine Guns - weapon_mg = { name = 'weapon_mg', label = 'Machinegun', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', image = 'weapon_mg.png', unique = true, useable = false, description = 'An automatic gun that fires bullets in rapid succession for as long as the trigger is pressed' }, - weapon_combatmg = { name = 'weapon_combatmg', label = 'Combat MG', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', image = 'weapon_combatmg.png', unique = true, useable = false, description = 'A combat version of an automatic gun that fires bullets in rapid succession for as long as the trigger is pressed' }, - weapon_gusenberg = { name = 'weapon_gusenberg', label = 'Thompson SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', image = 'weapon_gusenberg.png', unique = true, useable = false, description = 'An automatic rifle commonly referred to as a tommy gun' }, - weapon_combatmg_mk2 = { name = 'weapon_combatmg_mk2', label = 'Combat MG Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', image = 'weapon_combatmg_mk2.png', unique = true, useable = true, description = 'Weapon Combatmg MK2' }, + weapon_mg = { label = 'Machinegun', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', unique = true, description = 'An automatic gun that fires bullets in rapid succession for as long as the trigger is pressed' }, + weapon_combatmg = { label = 'Combat MG', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', unique = true, description = 'A combat version of an automatic gun that fires bullets in rapid succession for as long as the trigger is pressed' }, + weapon_gusenberg = { label = 'Thompson SMG', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', unique = true, description = 'An automatic rifle commonly referred to as a tommy gun' }, + weapon_combatmg_mk2 = { label = 'Combat MG Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_MG', unique = true, useable = true, description = 'Weapon Combatmg MK2' }, -- Sniper Rifles - weapon_sniperrifle = { name = 'weapon_sniperrifle', label = 'Sniper Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', image = 'weapon_sniperrifle.png', unique = true, useable = false, description = 'A high-precision, long-range rifle' }, - weapon_heavysniper = { name = 'weapon_heavysniper', label = 'Heavy Sniper', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', image = 'weapon_heavysniper.png', unique = true, useable = false, description = 'An upgraded high-precision, long-range rifle' }, - weapon_marksmanrifle = { name = 'weapon_marksmanrifle', label = 'Marksman Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', image = 'weapon_marksmanrifle.png', unique = true, useable = false, description = 'A very accurate single-fire rifle' }, - weapon_remotesniper = { name = 'weapon_remotesniper', label = 'Remote Sniper', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER_REMOTE', image = 'weapon_remotesniper.png', unique = true, useable = false, description = 'A portable high-precision, long-range rifle' }, - weapon_heavysniper_mk2 = { name = 'weapon_heavysniper_mk2', label = 'Heavy Sniper Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', image = 'weapon_heavysniper_mk2.png', unique = true, useable = true, description = 'Weapon Heavysniper MK2' }, - weapon_marksmanrifle_mk2 = { name = 'weapon_marksmanrifle_mk2', label = 'Marksman Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', image = 'weapon_marksmanrifle_mk2.png', unique = true, useable = true, description = 'Weapon Marksmanrifle MK2' }, + weapon_sniperrifle = { label = 'Sniper Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', unique = true, description = 'A high-precision, long-range rifle' }, + weapon_heavysniper = { label = 'Heavy Sniper', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', unique = true, description = 'An upgraded high-precision, long-range rifle' }, + weapon_marksmanrifle = { label = 'Marksman Rifle', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', unique = true, description = 'A very accurate single-fire rifle' }, + weapon_remotesniper = { label = 'Remote Sniper', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER_REMOTE', unique = true, description = 'A portable high-precision, long-range rifle' }, + weapon_heavysniper_mk2 = { label = 'Heavy Sniper Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', unique = true, useable = true, description = 'Weapon Heavysniper MK2' }, + weapon_marksmanrifle_mk2 = { label = 'Marksman Rifle Mk II', weight = 1000, type = 'weapon', ammotype = 'AMMO_SNIPER', unique = true, useable = true, description = 'Weapon Marksmanrifle MK2' }, -- Heavy Weapons - weapon_rpg = { name = 'weapon_rpg', label = 'RPG', weight = 1000, type = 'weapon', ammotype = 'AMMO_RPG', image = 'weapon_rpg.png', unique = true, useable = false, description = 'A rocket-propelled grenade launcher' }, - weapon_grenadelauncher = { name = 'weapon_grenadelauncher', label = 'Grenade Launcher', weight = 1000, type = 'weapon', ammotype = 'AMMO_GRENADELAUNCHER', image = 'weapon_grenadelauncher.png', unique = true, useable = false, description = 'A weapon that fires a specially-designed large-caliber projectile, often with an explosive, smoke or gas warhead' }, - weapon_grenadelauncher_smoke = { name = 'weapon_grenadelauncher_smoke', label = 'Smoke Grenade Launcher', weight = 1000, type = 'weapon', ammotype = 'AMMO_GRENADELAUNCHER', image = 'weapon_smokegrenade.png', unique = true, useable = false, description = 'A bomb that produces a lot of smoke when it explodes' }, - weapon_minigun = { name = 'weapon_minigun', label = 'Minigun', weight = 1000, type = 'weapon', ammotype = 'AMMO_MINIGUN', image = 'weapon_minigun.png', unique = true, useable = false, description = 'A portable machine gun consisting of a rotating cluster of six barrels and capable of variable rates of fire of up to 6,000 rounds per minute' }, - weapon_firework = { name = 'weapon_firework', label = 'Firework Launcher', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_firework.png', unique = true, useable = false, description = 'A device containing gunpowder and other combustible chemicals that causes a spectacular explosion when ignited' }, - weapon_railgun = { name = 'weapon_railgun', label = 'Railgun', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_railgun.png', unique = true, useable = false, description = 'A weapon that uses electromagnetic force to launch high velocity projectiles' }, - weapon_railgunxm3 = { name = 'weapon_railgunxm3', label = 'Railgun XM3', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_railgunxm3.png', unique = true, useable = false, description = 'A weapon that uses electromagnetic force to launch high velocity projectiles' }, - weapon_hominglauncher = { name = 'weapon_hominglauncher', label = 'Homing Launcher', weight = 1000, type = 'weapon', ammotype = 'AMMO_STINGER', image = 'weapon_hominglauncher.png', unique = true, useable = false, description = 'A weapon fitted with an electronic device that enables it to find and hit a target' }, - weapon_compactlauncher = { name = 'weapon_compactlauncher', label = 'Compact Launcher', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_compactlauncher.png', unique = true, useable = false, description = 'A compact grenade launcher' }, - weapon_rayminigun = { name = 'weapon_rayminigun', label = 'Widowmaker', weight = 1000, type = 'weapon', ammotype = 'AMMO_MINIGUN', image = 'weapon_rayminigun.png', unique = true, useable = true, description = 'Weapon Rayminigun' }, + weapon_rpg = { label = 'RPG', weight = 1000, type = 'weapon', ammotype = 'AMMO_RPG', unique = true, description = 'A rocket-propelled grenade launcher' }, + weapon_grenadelauncher = { label = 'Grenade Launcher', weight = 1000, type = 'weapon', ammotype = 'AMMO_GRENADELAUNCHER', unique = true, description = 'A weapon that fires a specially-designed large-caliber projectile, often with an explosive, smoke or gas warhead' }, + weapon_grenadelauncher_smoke = { label = 'Smoke Grenade Launcher', weight = 1000, type = 'weapon', ammotype = 'AMMO_GRENADELAUNCHER', image = 'weapon_smokegrenade.png', unique = true, description = 'A bomb that produces a lot of smoke when it explodes' }, + weapon_minigun = { label = 'Minigun', weight = 1000, type = 'weapon', ammotype = 'AMMO_MINIGUN', unique = true, description = 'A portable machine gun consisting of a rotating cluster of six barrels and capable of variable rates of fire of up to 6,000 rounds per minute' }, + weapon_firework = { label = 'Firework Launcher', weight = 1000, type = 'weapon', unique = true, description = 'A device containing gunpowder and other combustible chemicals that causes a spectacular explosion when ignited' }, + weapon_railgun = { label = 'Railgun', weight = 1000, type = 'weapon', unique = true, description = 'A weapon that uses electromagnetic force to launch high velocity projectiles' }, + weapon_railgunxm3 = { label = 'Railgun XM3', weight = 1000, type = 'weapon', unique = true, description = 'A weapon that uses electromagnetic force to launch high velocity projectiles' }, + weapon_hominglauncher = { label = 'Homing Launcher', weight = 1000, type = 'weapon', ammotype = 'AMMO_STINGER', unique = true, description = 'A weapon fitted with an electronic device that enables it to find and hit a target' }, + weapon_compactlauncher = { label = 'Compact Launcher', weight = 1000, type = 'weapon', unique = true, description = 'A compact grenade launcher' }, + weapon_rayminigun = { label = 'Widowmaker', weight = 1000, type = 'weapon', ammotype = 'AMMO_MINIGUN', unique = true, useable = true, description = 'Weapon Rayminigun' }, -- Throwables - weapon_grenade = { name = 'weapon_grenade', label = 'Grenade', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_grenade.png', unique = true, useable = false, description = 'A handheld throwable bomb' }, - weapon_bzgas = { name = 'weapon_bzgas', label = 'BZ Gas', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_bzgas.png', unique = true, useable = false, description = 'A cannister of gas that causes extreme pain' }, - weapon_molotov = { name = 'weapon_molotov', label = 'Molotov', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_molotov.png', unique = true, useable = false, description = 'A crude bomb made of a bottle filled with a flammable liquid and fitted with a wick for lighting' }, - weapon_stickybomb = { name = 'weapon_stickybomb', label = 'C4', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_stickybomb.png', unique = true, useable = false, description = 'An explosive charge covered with an adhesive that when thrown against an object sticks until it explodes' }, - weapon_proxmine = { name = 'weapon_proxmine', label = 'Proxmine Grenade', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_proximitymine.png', unique = true, useable = false, description = 'A bomb placed on the ground that detonates when going within its proximity' }, - weapon_snowball = { name = 'weapon_snowball', label = 'Snowball', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_snowball.png', unique = true, useable = false, description = 'A ball of packed snow, especially one made for throwing at other people for fun' }, - weapon_pipebomb = { name = 'weapon_pipebomb', label = 'Pipe Bomb', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_pipebomb.png', unique = true, useable = false, description = 'A homemade bomb, the components of which are contained in a pipe' }, - weapon_ball = { name = 'weapon_ball', label = 'Ball', weight = 1000, type = 'weapon', ammotype = 'AMMO_BALL', image = 'weapon_ball.png', unique = true, useable = false, description = 'A solid or hollow spherical or egg-shaped object that is kicked, thrown, or hit in a game' }, - weapon_smokegrenade = { name = 'weapon_smokegrenade', label = 'Smoke Grenade', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_c4.png', unique = true, useable = false, description = 'An explosive charge that can be remotely detonated' }, - weapon_flare = { name = 'weapon_flare', label = 'Flare pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_FLARE', image = 'weapon_flare.png', unique = true, useable = false, description = 'A small pyrotechnic devices used for illumination and signalling' }, + weapon_grenade = { label = 'Grenade', weight = 1000, type = 'weapon', unique = true, description = 'A handheld throwable bomb' }, + weapon_bzgas = { label = 'BZ Gas', weight = 1000, type = 'weapon', unique = true, description = 'A cannister of gas that causes extreme pain' }, + weapon_molotov = { label = 'Molotov', weight = 1000, type = 'weapon', unique = true, description = 'A crude bomb made of a bottle filled with a flammable liquid and fitted with a wick for lighting' }, + weapon_stickybomb = { label = 'C4', weight = 1000, type = 'weapon', unique = true, description = 'An explosive charge covered with an adhesive that when thrown against an object sticks until it explodes' }, + weapon_proxmine = { label = 'Proxmine Grenade', weight = 1000, type = 'weapon', image = 'weapon_proximitymine.png', unique = true, description = 'A bomb placed on the ground that detonates when going within its proximity' }, + weapon_snowball = { label = 'Snowball', weight = 1000, type = 'weapon', unique = true, description = 'A ball of packed snow, especially one made for throwing at other people for fun' }, + weapon_pipebomb = { label = 'Pipe Bomb', weight = 1000, type = 'weapon', unique = true, description = 'A homemade bomb, the components of which are contained in a pipe' }, + weapon_ball = { label = 'Ball', weight = 1000, type = 'weapon', ammotype = 'AMMO_BALL', unique = true, description = 'A solid or hollow spherical or egg-shaped object that is kicked, thrown, or hit in a game' }, + weapon_smokegrenade = { label = 'Smoke Grenade', weight = 1000, type = 'weapon', image = 'weapon_c4.png', unique = true, description = 'An explosive charge that can be remotely detonated' }, + weapon_flare = { label = 'Flare pistol', weight = 1000, type = 'weapon', ammotype = 'AMMO_FLARE', unique = true, description = 'A small pyrotechnic devices used for illumination and signalling' }, -- Miscellaneous - weapon_petrolcan = { name = 'weapon_petrolcan', label = 'Petrol Can', weight = 1000, type = 'weapon', ammotype = 'AMMO_PETROLCAN', image = 'weapon_petrolcan.png', unique = true, useable = false, description = 'A robust liquid container made from pressed steel' }, - weapon_fireextinguisher = { name = 'weapon_fireextinguisher', label = 'Fire Extinguisher', weight = 1000, type = 'weapon', ammotype = nil, image = 'weapon_fireextinguisher.png', unique = true, useable = false, description = 'A portable device that discharges a jet of water, foam, gas, or other material to extinguish a fire' }, - weapon_hazardcan = { name = 'weapon_hazardcan', label = 'Hazardous Jerry Can', weight = 1000, type = 'weapon', ammotype = 'AMMO_PETROLCAN', image = 'weapon_hazardcan.png', unique = true, useable = true, description = 'Weapon Hazardcan' }, + weapon_petrolcan = { label = 'Petrol Can', weight = 1000, type = 'weapon', ammotype = 'AMMO_PETROLCAN', unique = true, description = 'A robust liquid container made from pressed steel' }, + weapon_fireextinguisher = { label = 'Fire Extinguisher', weight = 1000, type = 'weapon', unique = true, description = 'A portable device that discharges a jet of water, foam, gas, or other material to extinguish a fire' }, + weapon_hazardcan = { label = 'Hazardous Jerry Can', weight = 1000, type = 'weapon', ammotype = 'AMMO_PETROLCAN', unique = true, useable = true, description = 'Weapon Hazardcan' }, -- Weapon Attachments - clip_attachment = { name = 'clip_attachment', label = 'Clip', weight = 1000, type = 'item', image = 'clip_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A clip for a weapon' }, - drum_attachment = { name = 'drum_attachment', label = 'Drum', weight = 1000, type = 'item', image = 'drum_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A drum for a weapon' }, - flashlight_attachment = { name = 'flashlight_attachment', label = 'Flashlight', weight = 1000, type = 'item', image = 'flashlight_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A flashlight for a weapon' }, - suppressor_attachment = { name = 'suppressor_attachment', label = 'Suppressor', weight = 1000, type = 'item', image = 'suppressor_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A suppressor for a weapon' }, - smallscope_attachment = { name = 'smallscope_attachment', label = 'Small Scope', weight = 1000, type = 'item', image = 'smallscope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A small scope for a weapon' }, - medscope_attachment = { name = 'medscope_attachment', label = 'Medium Scope', weight = 1000, type = 'item', image = 'medscope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A medium scope for a weapon' }, - largescope_attachment = { name = 'largescope_attachment', label = 'Large Scope', weight = 1000, type = 'item', image = 'largescope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A large scope for a weapon' }, - holoscope_attachment = { name = 'holoscope_attachment', label = 'Holo Scope', weight = 1000, type = 'item', image = 'holoscope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A holo scope for a weapon' }, - advscope_attachment = { name = 'advscope_attachment', label = 'Advanced Scope', weight = 1000, type = 'item', image = 'advscope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'An advanced scope for a weapon' }, - nvscope_attachment = { name = 'nvscope_attachment', label = 'Night Vision Scope', weight = 1000, type = 'item', image = 'nvscope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A night vision scope for a weapon' }, - thermalscope_attachment = { name = 'thermalscope_attachment', label = 'Thermal Scope', weight = 1000, type = 'item', image = 'thermalscope_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A thermal scope for a weapon' }, - flat_muzzle_brake = { name = 'flat_muzzle_brake', label = 'Flat Muzzle Brake', weight = 1000, type = 'item', image = 'flat_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - tactical_muzzle_brake = { name = 'tactical_muzzle_brake', label = 'Tactical Muzzle Brake', weight = 1000, type = 'item', image = 'tactical_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brakee for a weapon' }, - fat_end_muzzle_brake = { name = 'fat_end_muzzle_brake', label = 'Fat End Muzzle Brake', weight = 1000, type = 'item', image = 'fat_end_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - precision_muzzle_brake = { name = 'precision_muzzle_brake', label = 'Precision Muzzle Brake', weight = 1000, type = 'item', image = 'precision_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - heavy_duty_muzzle_brake = { name = 'heavy_duty_muzzle_brake', label = 'HD Muzzle Brake', weight = 1000, type = 'item', image = 'heavy_duty_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - slanted_muzzle_brake = { name = 'slanted_muzzle_brake', label = 'Slanted Muzzle Brake', weight = 1000, type = 'item', image = 'slanted_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - split_end_muzzle_brake = { name = 'split_end_muzzle_brake', label = 'Split End Muzzle Brake', weight = 1000, type = 'item', image = 'split_end_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - squared_muzzle_brake = { name = 'squared_muzzle_brake', label = 'Squared Muzzle Brake', weight = 1000, type = 'item', image = 'squared_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - bellend_muzzle_brake = { name = 'bellend_muzzle_brake', label = 'Bellend Muzzle Brake', weight = 1000, type = 'item', image = 'bellend_muzzle_brake.png', unique = false, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, - barrel_attachment = { name = 'barrel_attachment', label = 'Barrel', weight = 1000, type = 'item', image = 'barrel_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A barrel for a weapon' }, - grip_attachment = { name = 'grip_attachment', label = 'Grip', weight = 1000, type = 'item', image = 'grip_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A grip for a weapon' }, - comp_attachment = { name = 'comp_attachment', label = 'Compensator', weight = 1000, type = 'item', image = 'comp_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A compensator for a weapon' }, - luxuryfinish_attachment = { name = 'luxuryfinish_attachment', label = 'Luxury Finish', weight = 1000, type = 'item', image = 'luxuryfinish_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A luxury finish for a weapon' }, - digicamo_attachment = { name = 'digicamo_attachment', label = 'Digital Camo', weight = 1000, type = 'item', image = 'digicamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A digital camo for a weapon' }, - brushcamo_attachment = { name = 'brushcamo_attachment', label = 'Brushstroke Camo', weight = 1000, type = 'item', image = 'brushcamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A brushstroke camo for a weapon' }, - woodcamo_attachment = { name = 'woodcamo_attachment', label = 'Woodland Camo', weight = 1000, type = 'item', image = 'woodcamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A woodland camo for a weapon' }, - skullcamo_attachment = { name = 'skullcamo_attachment', label = 'Skull Camo', weight = 1000, type = 'item', image = 'skullcamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A skull camo for a weapon' }, - sessantacamo_attachment = { name = 'sessantacamo_attachment', label = 'Sessanta Nove Camo', weight = 1000, type = 'item', image = 'sessantacamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A sessanta nove camo for a weapon' }, - perseuscamo_attachment = { name = 'perseuscamo_attachment', label = 'Perseus Camo', weight = 1000, type = 'item', image = 'perseuscamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A perseus camo for a weapon' }, - leopardcamo_attachment = { name = 'leopardcamo_attachment', label = 'Leopard Camo', weight = 1000, type = 'item', image = 'leopardcamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A leopard camo for a weapon' }, - zebracamo_attachment = { name = 'zebracamo_attachment', label = 'Zebra Camo', weight = 1000, type = 'item', image = 'zebracamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A zebra camo for a weapon' }, - geocamo_attachment = { name = 'geocamo_attachment', label = 'Geometric Camo', weight = 1000, type = 'item', image = 'geocamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A geometric camo for a weapon' }, - boomcamo_attachment = { name = 'boomcamo_attachment', label = 'Boom Camo', weight = 1000, type = 'item', image = 'boomcamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A boom camo for a weapon' }, - patriotcamo_attachment = { name = 'patriotcamo_attachment', label = 'Patriot Camo', weight = 1000, type = 'item', image = 'patriotcamo_attachment.png', unique = false, useable = true, shouldClose = true, description = 'A patriot camo for a weapon' }, + clip_attachment = { label = 'Clip', weight = 1000, useable = true, shouldClose = true, description = 'A clip for a weapon' }, + drum_attachment = { label = 'Drum', weight = 1000, useable = true, shouldClose = true, description = 'A drum for a weapon' }, + flashlight_attachment = { label = 'Flashlight', weight = 1000, useable = true, shouldClose = true, description = 'A flashlight for a weapon' }, + suppressor_attachment = { label = 'Suppressor', weight = 1000, useable = true, shouldClose = true, description = 'A suppressor for a weapon' }, + smallscope_attachment = { label = 'Small Scope', weight = 1000, useable = true, shouldClose = true, description = 'A small scope for a weapon' }, + medscope_attachment = { label = 'Medium Scope', weight = 1000, useable = true, shouldClose = true, description = 'A medium scope for a weapon' }, + largescope_attachment = { label = 'Large Scope', weight = 1000, useable = true, shouldClose = true, description = 'A large scope for a weapon' }, + holoscope_attachment = { label = 'Holo Scope', weight = 1000, useable = true, shouldClose = true, description = 'A holo scope for a weapon' }, + advscope_attachment = { label = 'Advanced Scope', weight = 1000, useable = true, shouldClose = true, description = 'An advanced scope for a weapon' }, + nvscope_attachment = { label = 'Night Vision Scope', weight = 1000, useable = true, shouldClose = true, description = 'A night vision scope for a weapon' }, + thermalscope_attachment = { label = 'Thermal Scope', weight = 1000, useable = true, shouldClose = true, description = 'A thermal scope for a weapon' }, + flat_muzzle_brake = { label = 'Flat Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + tactical_muzzle_brake = { label = 'Tactical Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brakee for a weapon' }, + fat_end_muzzle_brake = { label = 'Fat End Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + precision_muzzle_brake = { label = 'Precision Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + heavy_duty_muzzle_brake = { label = 'HD Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + slanted_muzzle_brake = { label = 'Slanted Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + split_end_muzzle_brake = { label = 'Split End Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + squared_muzzle_brake = { label = 'Squared Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + bellend_muzzle_brake = { label = 'Bellend Muzzle Brake', weight = 1000, useable = true, shouldClose = true, description = 'A muzzle brake for a weapon' }, + barrel_attachment = { label = 'Barrel', weight = 1000, useable = true, shouldClose = true, description = 'A barrel for a weapon' }, + grip_attachment = { label = 'Grip', weight = 1000, useable = true, shouldClose = true, description = 'A grip for a weapon' }, + comp_attachment = { label = 'Compensator', weight = 1000, useable = true, shouldClose = true, description = 'A compensator for a weapon' }, + luxuryfinish_attachment = { label = 'Luxury Finish', weight = 1000, useable = true, shouldClose = true, description = 'A luxury finish for a weapon' }, + digicamo_attachment = { label = 'Digital Camo', weight = 1000, useable = true, shouldClose = true, description = 'A digital camo for a weapon' }, + brushcamo_attachment = { label = 'Brushstroke Camo', weight = 1000, useable = true, shouldClose = true, description = 'A brushstroke camo for a weapon' }, + woodcamo_attachment = { label = 'Woodland Camo', weight = 1000, useable = true, shouldClose = true, description = 'A woodland camo for a weapon' }, + skullcamo_attachment = { label = 'Skull Camo', weight = 1000, useable = true, shouldClose = true, description = 'A skull camo for a weapon' }, + sessantacamo_attachment = { label = 'Sessanta Nove Camo', weight = 1000, useable = true, shouldClose = true, description = 'A sessanta nove camo for a weapon' }, + perseuscamo_attachment = { label = 'Perseus Camo', weight = 1000, useable = true, shouldClose = true, description = 'A perseus camo for a weapon' }, + leopardcamo_attachment = { label = 'Leopard Camo', weight = 1000, useable = true, shouldClose = true, description = 'A leopard camo for a weapon' }, + zebracamo_attachment = { label = 'Zebra Camo', weight = 1000, useable = true, shouldClose = true, description = 'A zebra camo for a weapon' }, + geocamo_attachment = { label = 'Geometric Camo', weight = 1000, useable = true, shouldClose = true, description = 'A geometric camo for a weapon' }, + boomcamo_attachment = { label = 'Boom Camo', weight = 1000, useable = true, shouldClose = true, description = 'A boom camo for a weapon' }, + patriotcamo_attachment = { label = 'Patriot Camo', weight = 1000, useable = true, shouldClose = true, description = 'A patriot camo for a weapon' }, -- Weapon Tints - weapontint_0 = { name = 'weapontint_0', label = 'Default Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Default/Black Weapon Tint' }, - weapontint_1 = { name = 'weapontint_1', label = 'Green Tint', weight = 1000, type = 'item', image = 'weapontint_green.png', unique = false, useable = true, shouldClose = true, description = 'Green Weapon Tint' }, - weapontint_2 = { name = 'weapontint_2', label = 'Gold Tint', weight = 1000, type = 'item', image = 'weapontint_gold.png', unique = false, useable = true, shouldClose = true, description = 'Gold Weapon Tint' }, - weapontint_3 = { name = 'weapontint_3', label = 'Pink Tint', weight = 1000, type = 'item', image = 'weapontint_pink.png', unique = false, useable = true, shouldClose = true, description = 'Pink Weapon Tint' }, - weapontint_4 = { name = 'weapontint_4', label = 'Army Tint', weight = 1000, type = 'item', image = 'weapontint_army.png', unique = false, useable = true, shouldClose = true, description = 'Army Weapon Tint' }, - weapontint_5 = { name = 'weapontint_5', label = 'LSPD Tint', weight = 1000, type = 'item', image = 'weapontint_lspd.png', unique = false, useable = true, shouldClose = true, description = 'LSPD Weapon Tint' }, - weapontint_6 = { name = 'weapontint_6', label = 'Orange Tint', weight = 1000, type = 'item', image = 'weapontint_orange.png', unique = false, useable = true, shouldClose = true, description = 'Orange Weapon Tint' }, - weapontint_7 = { name = 'weapontint_7', label = 'Platinum Tint', weight = 1000, type = 'item', image = 'weapontint_plat.png', unique = false, useable = true, shouldClose = true, description = 'Platinum Weapon Tint' }, - weapontint_mk2_0 = { name = 'weapontint_mk2_0', label = 'Classic Black Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Black Weapon Tint for MK2 Weapons' }, - weapontint_mk2_1 = { name = 'weapontint_mk2_1', label = 'Classic Gray Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Gray Weapon Tint for MK2 Weapons' }, - weapontint_mk2_2 = { name = 'weapontint_mk2_2', label = 'Classic Two-Tone Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Two-Tone Weapon Tint for MK2 Weapons' }, - weapontint_mk2_3 = { name = 'weapontint_mk2_3', label = 'Classic White Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic White Weapon Tint for MK2 Weapons' }, - weapontint_mk2_4 = { name = 'weapontint_mk2_4', label = 'Classic Beige Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Beige Weapon Tint for MK2 Weapons' }, - weapontint_mk2_5 = { name = 'weapontint_mk2_5', label = 'Classic Green Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Green Weapon Tint for MK2 Weapons' }, - weapontint_mk2_6 = { name = 'weapontint_mk2_6', label = 'Classic Blue Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Blue Weapon Tint for MK2 Weapons' }, - weapontint_mk2_7 = { name = 'weapontint_mk2_7', label = 'Classic Earth Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Earth Weapon Tint for MK2 Weapons' }, - weapontint_mk2_8 = { name = 'weapontint_mk2_8', label = 'Classic Brown & Black Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Classic Brown & Black Weapon Tint for MK2 Weapons' }, - weapontint_mk2_9 = { name = 'weapontint_mk2_9', label = 'Red Contrast Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Red Contrast Weapon Tint for MK2 Weapons' }, - weapontint_mk2_10 = { name = 'weapontint_mk2_10', label = 'Blue Contrast Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Blue Contrast Weapon Tint for MK2 Weapons' }, - weapontint_mk2_11 = { name = 'weapontint_mk2_11', label = 'Yellow Contrast Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Yellow Contrast Weapon Tint for MK2 Weapons' }, - weapontint_mk2_12 = { name = 'weapontint_mk2_12', label = 'Orange Contrast Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Orange Contrast Weapon Tint for MK2 Weapons' }, - weapontint_mk2_13 = { name = 'weapontint_mk2_13', label = 'Bold Pink Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Pink Weapon Tint for MK2 Weapons' }, - weapontint_mk2_14 = { name = 'weapontint_mk2_14', label = 'Bold Purple & Yellow Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Purple & Yellow Weapon Tint for MK2 Weapons' }, - weapontint_mk2_15 = { name = 'weapontint_mk2_15', label = 'Bold Orange Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Orange Weapon Tint for MK2 Weapons' }, - weapontint_mk2_16 = { name = 'weapontint_mk2_16', label = 'Bold Green & Purple Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Green & Purple Weapon Tint for MK2 Weapons' }, - weapontint_mk2_17 = { name = 'weapontint_mk2_17', label = 'Bold Red Features Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Red Features Weapon Tint for MK2 Weapons' }, - weapontint_mk2_18 = { name = 'weapontint_mk2_18', label = 'Bold Green Features Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Green Features Weapon Tint for MK2 Weapons' }, - weapontint_mk2_19 = { name = 'weapontint_mk2_19', label = 'Bold Cyan Features Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Cyan Features Weapon Tint for MK2 Weapons' }, - weapontint_mk2_20 = { name = 'weapontint_mk2_20', label = 'Bold Yellow Features Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Yellow Features Weapon Tint for MK2 Weapons' }, - weapontint_mk2_21 = { name = 'weapontint_mk2_21', label = 'Bold Red & White Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Red & White Weapon Tint for MK2 Weapons' }, - weapontint_mk2_22 = { name = 'weapontint_mk2_22', label = 'Bold Blue & White Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Bold Blue & White Weapon Tint for MK2 Weapons' }, - weapontint_mk2_23 = { name = 'weapontint_mk2_23', label = 'Metallic Gold Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Gold Weapon Tint for MK2 Weapons' }, - weapontint_mk2_24 = { name = 'weapontint_mk2_24', label = 'Metallic Platinum Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Platinum Weapon Tint for MK2 Weapons' }, - weapontint_mk2_25 = { name = 'weapontint_mk2_25', label = 'Metallic Gray & Lilac Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Gray & Lilac Weapon Tint for MK2 Weapons' }, - weapontint_mk2_26 = { name = 'weapontint_mk2_26', label = 'Metallic Purple & Lime Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Purple & Lime Weapon Tint for MK2 Weapons' }, - weapontint_mk2_27 = { name = 'weapontint_mk2_27', label = 'Metallic Red Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Red Weapon Tint for MK2 Weapons' }, - weapontint_mk2_28 = { name = 'weapontint_mk2_28', label = 'Metallic Green Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Green Weapon Tint for MK2 Weapons' }, - weapontint_mk2_29 = { name = 'weapontint_mk2_29', label = 'Metallic Blue Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Blue Weapon Tint for MK2 Weapons' }, - weapontint_mk2_30 = { name = 'weapontint_mk2_30', label = 'Metallic White & Aqua Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic White & Aqua Weapon Tint for MK2 Weapons' }, - weapontint_mk2_31 = { name = 'weapontint_mk2_31', label = 'Metallic Orange & Yellow Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Orange & Yellow Weapon Tint for MK2 Weapons' }, - weapontint_mk2_32 = { name = 'weapontint_mk2_32', label = 'Metallic Red and Yellow Tint', weight = 1000, type = 'item', image = 'weapontint_black.png', unique = false, useable = true, shouldClose = true, description = 'Metallic Red and Yellow Weapon Tint for MK2 Weapons' }, + weapontint_0 = { label = 'Default Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Default/Black Weapon Tint' }, + weapontint_1 = { label = 'Green Tint', weight = 1000, image = 'weapontint_green.png', useable = true, shouldClose = true, description = 'Green Weapon Tint' }, + weapontint_2 = { label = 'Gold Tint', weight = 1000, image = 'weapontint_gold.png', useable = true, shouldClose = true, description = 'Gold Weapon Tint' }, + weapontint_3 = { label = 'Pink Tint', weight = 1000, image = 'weapontint_pink.png', useable = true, shouldClose = true, description = 'Pink Weapon Tint' }, + weapontint_4 = { label = 'Army Tint', weight = 1000, image = 'weapontint_army.png', useable = true, shouldClose = true, description = 'Army Weapon Tint' }, + weapontint_5 = { label = 'LSPD Tint', weight = 1000, image = 'weapontint_lspd.png', useable = true, shouldClose = true, description = 'LSPD Weapon Tint' }, + weapontint_6 = { label = 'Orange Tint', weight = 1000, image = 'weapontint_orange.png', useable = true, shouldClose = true, description = 'Orange Weapon Tint' }, + weapontint_7 = { label = 'Platinum Tint', weight = 1000, image = 'weapontint_plat.png', useable = true, shouldClose = true, description = 'Platinum Weapon Tint' }, + weapontint_mk2_0 = { label = 'Classic Black Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Black Weapon Tint for MK2 Weapons' }, + weapontint_mk2_1 = { label = 'Classic Gray Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Gray Weapon Tint for MK2 Weapons' }, + weapontint_mk2_2 = { label = 'Classic Two-Tone Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Two-Tone Weapon Tint for MK2 Weapons' }, + weapontint_mk2_3 = { label = 'Classic White Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic White Weapon Tint for MK2 Weapons' }, + weapontint_mk2_4 = { label = 'Classic Beige Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Beige Weapon Tint for MK2 Weapons' }, + weapontint_mk2_5 = { label = 'Classic Green Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Green Weapon Tint for MK2 Weapons' }, + weapontint_mk2_6 = { label = 'Classic Blue Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Blue Weapon Tint for MK2 Weapons' }, + weapontint_mk2_7 = { label = 'Classic Earth Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Earth Weapon Tint for MK2 Weapons' }, + weapontint_mk2_8 = { label = 'Classic Brown & Black Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Classic Brown & Black Weapon Tint for MK2 Weapons' }, + weapontint_mk2_9 = { label = 'Red Contrast Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Red Contrast Weapon Tint for MK2 Weapons' }, + weapontint_mk2_10 = { label = 'Blue Contrast Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Blue Contrast Weapon Tint for MK2 Weapons' }, + weapontint_mk2_11 = { label = 'Yellow Contrast Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Yellow Contrast Weapon Tint for MK2 Weapons' }, + weapontint_mk2_12 = { label = 'Orange Contrast Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Orange Contrast Weapon Tint for MK2 Weapons' }, + weapontint_mk2_13 = { label = 'Bold Pink Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Pink Weapon Tint for MK2 Weapons' }, + weapontint_mk2_14 = { label = 'Bold Purple & Yellow Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Purple & Yellow Weapon Tint for MK2 Weapons' }, + weapontint_mk2_15 = { label = 'Bold Orange Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Orange Weapon Tint for MK2 Weapons' }, + weapontint_mk2_16 = { label = 'Bold Green & Purple Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Green & Purple Weapon Tint for MK2 Weapons' }, + weapontint_mk2_17 = { label = 'Bold Red Features Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Red Features Weapon Tint for MK2 Weapons' }, + weapontint_mk2_18 = { label = 'Bold Green Features Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Green Features Weapon Tint for MK2 Weapons' }, + weapontint_mk2_19 = { label = 'Bold Cyan Features Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Cyan Features Weapon Tint for MK2 Weapons' }, + weapontint_mk2_20 = { label = 'Bold Yellow Features Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Yellow Features Weapon Tint for MK2 Weapons' }, + weapontint_mk2_21 = { label = 'Bold Red & White Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Red & White Weapon Tint for MK2 Weapons' }, + weapontint_mk2_22 = { label = 'Bold Blue & White Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Bold Blue & White Weapon Tint for MK2 Weapons' }, + weapontint_mk2_23 = { label = 'Metallic Gold Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Gold Weapon Tint for MK2 Weapons' }, + weapontint_mk2_24 = { label = 'Metallic Platinum Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Platinum Weapon Tint for MK2 Weapons' }, + weapontint_mk2_25 = { label = 'Metallic Gray & Lilac Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Gray & Lilac Weapon Tint for MK2 Weapons' }, + weapontint_mk2_26 = { label = 'Metallic Purple & Lime Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Purple & Lime Weapon Tint for MK2 Weapons' }, + weapontint_mk2_27 = { label = 'Metallic Red Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Red Weapon Tint for MK2 Weapons' }, + weapontint_mk2_28 = { label = 'Metallic Green Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Green Weapon Tint for MK2 Weapons' }, + weapontint_mk2_29 = { label = 'Metallic Blue Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Blue Weapon Tint for MK2 Weapons' }, + weapontint_mk2_30 = { label = 'Metallic White & Aqua Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic White & Aqua Weapon Tint for MK2 Weapons' }, + weapontint_mk2_31 = { label = 'Metallic Orange & Yellow Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Orange & Yellow Weapon Tint for MK2 Weapons' }, + weapontint_mk2_32 = { label = 'Metallic Red and Yellow Tint', weight = 1000, image = 'weapontint_black.png', useable = true, shouldClose = true, description = 'Metallic Red and Yellow Weapon Tint for MK2 Weapons' }, -- ITEMS -- Ammo ITEMS - pistol_ammo = { name = 'pistol_ammo', label = 'Pistol ammo', weight = 200, type = 'item', image = 'pistol_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Pistols' }, - rifle_ammo = { name = 'rifle_ammo', label = 'Rifle ammo', weight = 1000, type = 'item', image = 'rifle_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Rifles' }, - smg_ammo = { name = 'smg_ammo', label = 'SMG ammo', weight = 500, type = 'item', image = 'smg_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Sub Machine Guns' }, - shotgun_ammo = { name = 'shotgun_ammo', label = 'Shotgun ammo', weight = 500, type = 'item', image = 'shotgun_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Shotguns' }, - mg_ammo = { name = 'mg_ammo', label = 'MG ammo', weight = 1000, type = 'item', image = 'mg_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Machine Guns' }, - snp_ammo = { name = 'snp_ammo', label = 'Sniper ammo', weight = 1000, type = 'item', image = 'rifle_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Sniper Rifles' }, - emp_ammo = { name = 'emp_ammo', label = 'EMP Ammo', weight = 200, type = 'item', image = 'emp_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for EMP Launcher' }, + pistol_ammo = { label = 'Pistol ammo', weight = 200, useable = true, shouldClose = true, description = 'Ammo for Pistols' }, + rifle_ammo = { label = 'Rifle ammo', weight = 1000, useable = true, shouldClose = true, description = 'Ammo for Rifles' }, + smg_ammo = { label = 'SMG ammo', weight = 500, useable = true, shouldClose = true, description = 'Ammo for Sub Machine Guns' }, + shotgun_ammo = { label = 'Shotgun ammo', weight = 500, useable = true, shouldClose = true, description = 'Ammo for Shotguns' }, + mg_ammo = { label = 'MG ammo', weight = 1000, useable = true, shouldClose = true, description = 'Ammo for Machine Guns' }, + snp_ammo = { label = 'Sniper ammo', weight = 1000, image = 'rifle_ammo.png', useable = true, shouldClose = true, description = 'Ammo for Sniper Rifles' }, + emp_ammo = { label = 'EMP Ammo', weight = 200, useable = true, shouldClose = true, description = 'Ammo for EMP Launcher' }, -- Card ITEMS - id_card = { name = 'id_card', label = 'ID Card', weight = 0, type = 'item', image = 'id_card.png', unique = true, useable = true, shouldClose = false, description = 'A card containing all your information to identify yourself' }, - driver_license = { name = 'driver_license', label = 'Drivers License', weight = 0, type = 'item', image = 'driver_license.png', unique = true, useable = true, shouldClose = false, description = 'Permit to show you can drive a vehicle' }, - lawyerpass = { name = 'lawyerpass', label = 'Lawyer Pass', weight = 0, type = 'item', image = 'lawyerpass.png', unique = true, useable = true, shouldClose = false, description = 'Pass exclusive to lawyers to show they can represent a suspect' }, - weaponlicense = { name = 'weaponlicense', label = 'Weapon License', weight = 0, type = 'item', image = 'weapon_license.png', unique = true, useable = true, shouldClose = true, description = 'Weapon License' }, - bank_card = { name = 'bank_card', label = 'Bank Card', weight = 0, type = 'item', image = 'bank_card.png', unique = true, useable = true, shouldClose = true, description = 'Used to access ATM' }, - security_card_01 = { name = 'security_card_01', label = 'Security Card A', weight = 0, type = 'item', image = 'security_card_01.png', unique = false, useable = true, shouldClose = true, description = 'A security card... I wonder what it goes to' }, - security_card_02 = { name = 'security_card_02', label = 'Security Card B', weight = 0, type = 'item', image = 'security_card_02.png', unique = false, useable = true, shouldClose = true, description = 'A security card... I wonder what it goes to' }, + id_card = { label = 'ID Card', unique = true, useable = true, description = 'A card containing all your information to identify yourself' }, + driver_license = { label = 'Drivers License', unique = true, useable = true, description = 'Permit to show you can drive a vehicle' }, + lawyerpass = { label = 'Lawyer Pass', unique = true, useable = true, description = 'Pass exclusive to lawyers to show they can represent a suspect' }, + weaponlicense = { label = 'Weapon License', image = 'weapon_license.png', unique = true, useable = true, shouldClose = true, description = 'Weapon License' }, + bank_card = { label = 'Bank Card', unique = true, useable = true, shouldClose = true, description = 'Used to access ATM' }, + security_card_01 = { label = 'Security Card A', useable = true, shouldClose = true, description = 'A security card... I wonder what it goes to' }, + security_card_02 = { label = 'Security Card B', useable = true, shouldClose = true, description = 'A security card... I wonder what it goes to' }, -- Eat ITEMS - tosti = { name = 'tosti', label = 'Grilled Cheese Sandwich', weight = 200, type = 'item', image = 'tosti.png', unique = false, useable = true, shouldClose = true, description = 'Nice to eat' }, - twerks_candy = { name = 'twerks_candy', label = 'Twerks', weight = 100, type = 'item', image = 'twerks_candy.png', unique = false, useable = true, shouldClose = true, description = 'Some delicious candy :O' }, - snikkel_candy = { name = 'snikkel_candy', label = 'Snikkel', weight = 100, type = 'item', image = 'snikkel_candy.png', unique = false, useable = true, shouldClose = true, description = 'Some delicious candy :O' }, - sandwich = { name = 'sandwich', label = 'Sandwich', weight = 200, type = 'item', image = 'sandwich.png', unique = false, useable = true, shouldClose = true, description = 'Nice bread for your stomach' }, + tosti = { label = 'Grilled Cheese Sandwich', weight = 200, useable = true, shouldClose = true, description = 'Nice to eat' }, + twerks_candy = { label = 'Twerks', weight = 100, useable = true, shouldClose = true, description = 'Some delicious candy :O' }, + snikkel_candy = { label = 'Snikkel', weight = 100, useable = true, shouldClose = true, description = 'Some delicious candy :O' }, + sandwich = { label = 'Sandwich', weight = 200, useable = true, shouldClose = true, description = 'Nice bread for your stomach' }, -- Drink ITEMS - water_bottle = { name = 'water_bottle', label = 'Bottle of Water', weight = 500, type = 'item', image = 'water_bottle.png', unique = false, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, - coffee = { name = 'coffee', label = 'Coffee', weight = 200, type = 'item', image = 'coffee.png', unique = false, useable = true, shouldClose = true, description = 'Pump 4 Caffeine' }, - kurkakola = { name = 'kurkakola', label = 'Cola', weight = 500, type = 'item', image = 'cola.png', unique = false, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, + water_bottle = { label = 'Bottle of Water', weight = 500, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, + coffee = { label = 'Coffee', weight = 200, useable = true, shouldClose = true, description = 'Pump 4 Caffeine' }, + kurkakola = { label = 'Cola', weight = 500, image = 'cola.png', useable = true, shouldClose = true, description = 'For all the thirsty out there' }, -- Alcohol - beer = { name = 'beer', label = 'Beer', weight = 500, type = 'item', image = 'beer.png', unique = false, useable = true, shouldClose = true, description = 'Nothing like a good cold beer!' }, - whiskey = { name = 'whiskey', label = 'Whiskey', weight = 500, type = 'item', image = 'whiskey.png', unique = false, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, - vodka = { name = 'vodka', label = 'Vodka', weight = 500, type = 'item', image = 'vodka.png', unique = false, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, - grape = { name = 'grape', label = 'Grape', weight = 100, type = 'item', image = 'grape.png', unique = false, useable = true, shouldClose = false, description = 'Mmmmh yummie, grapes' }, - wine = { name = 'wine', label = 'Wine', weight = 300, type = 'item', image = 'wine.png', unique = false, useable = true, shouldClose = false, description = 'Some good wine to drink on a fine evening' }, - grapejuice = { name = 'grapejuice', label = 'Grape Juice', weight = 200, type = 'item', image = 'grapejuice.png', unique = false, useable = true, shouldClose = false, description = 'Grape juice is said to be healthy' }, + beer = { label = 'Beer', weight = 500, useable = true, shouldClose = true, description = 'Nothing like a good cold beer!' }, + whiskey = { label = 'Whiskey', weight = 500, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, + vodka = { label = 'Vodka', weight = 500, useable = true, shouldClose = true, description = 'For all the thirsty out there' }, + grape = { label = 'Grape', weight = 100, useable = true, description = 'Mmmmh yummie, grapes' }, + wine = { label = 'Wine', weight = 300, useable = true, description = 'Some good wine to drink on a fine evening' }, + grapejuice = { label = 'Grape Juice', weight = 200, useable = true, description = 'Grape juice is said to be healthy' }, -- Drugs - joint = { name = 'joint', label = 'Joint', weight = 0, type = 'item', image = 'joint.png', unique = false, useable = true, shouldClose = true, description = 'Sidney would be very proud at you' }, - cokebaggy = { name = 'cokebaggy', label = 'Bag of Coke', weight = 0, type = 'item', image = 'cocaine_baggy.png', unique = false, useable = true, shouldClose = true, description = 'To get happy real quick' }, - crack_baggy = { name = 'crack_baggy', label = 'Bag of Crack', weight = 0, type = 'item', image = 'crack_baggy.png', unique = false, useable = true, shouldClose = true, description = 'To get happy faster' }, - xtcbaggy = { name = 'xtcbaggy', label = 'Bag of XTC', weight = 0, type = 'item', image = 'xtc_baggy.png', unique = false, useable = true, shouldClose = true, description = 'Pop those pills baby' }, - coke_brick = { name = 'coke_brick', label = 'Coke Brick', weight = 1000, type = 'item', image = 'coke_brick.png', unique = true, useable = false, shouldClose = true, description = 'Heavy package of cocaine, mostly used for deals and takes a lot of space' }, - weed_brick = { name = 'weed_brick', label = 'Weed Brick', weight = 1000, type = 'item', image = 'weed_brick.png', unique = false, useable = false, shouldClose = true, description = '1KG Weed Brick to sell to large customers.' }, - coke_small_brick = { name = 'coke_small_brick', label = 'Coke Package', weight = 350, type = 'item', image = 'coke_small_brick.png', unique = true, useable = false, shouldClose = true, description = 'Small package of cocaine, mostly used for deals and takes a lot of space' }, - oxy = { name = 'oxy', label = 'Prescription Oxy', weight = 0, type = 'item', image = 'oxy.png', unique = false, useable = true, shouldClose = true, description = 'The Label Has Been Ripped Off' }, - meth = { name = 'meth', label = 'Meth', weight = 100, type = 'item', image = 'meth_baggy.png', unique = false, useable = true, shouldClose = true, description = 'A baggie of Meth' }, - rolling_paper = { name = 'rolling_paper', label = 'Rolling Paper', weight = 0, type = 'item', image = 'rolling_paper.png', unique = false, useable = false, shouldClose = true, description = 'Paper made specifically for encasing and smoking tobacco or cannabis.' }, + joint = { label = 'Joint', useable = true, shouldClose = true, description = 'Sidney would be very proud at you' }, + cokebaggy = { label = 'Bag of Coke', image = 'cocaine_baggy.png', useable = true, shouldClose = true, description = 'To get happy real quick' }, + crack_baggy = { label = 'Bag of Crack', useable = true, shouldClose = true, description = 'To get happy faster' }, + xtcbaggy = { label = 'Bag of XTC', image = 'xtc_baggy.png', useable = true, shouldClose = true, description = 'Pop those pills baby' }, + coke_brick = { label = 'Coke Brick', weight = 1000, unique = true, shouldClose = true, description = 'Heavy package of cocaine, mostly used for deals and takes a lot of space' }, + weed_brick = { label = 'Weed Brick', weight = 1000, shouldClose = true, description = '1KG Weed Brick to sell to large customers.' }, + coke_small_brick = { label = 'Coke Package', weight = 350, unique = true, shouldClose = true, description = 'Small package of cocaine, mostly used for deals and takes a lot of space' }, + oxy = { label = 'Prescription Oxy', useable = true, shouldClose = true, description = 'The Label Has Been Ripped Off' }, + meth = { label = 'Meth', weight = 100, image = 'meth_baggy.png', useable = true, shouldClose = true, description = 'A baggie of Meth' }, + rolling_paper = { label = 'Rolling Paper', shouldClose = true, description = 'Paper made specifically for encasing and smoking tobacco or cannabis.' }, -- Seed And Weed - weed_whitewidow = { name = 'weed_whitewidow', label = 'White Widow 2g', weight = 200, type = 'item', image = 'weed_baggy.png', unique = false, useable = true, shouldClose = false, description = 'A weed bag with 2g White Widow' }, - weed_skunk = { name = 'weed_skunk', label = 'Skunk 2g', weight = 200, type = 'item', image = 'weed_baggy.png', unique = false, useable = true, shouldClose = false, description = 'A weed bag with 2g Skunk' }, - weed_purplehaze = { name = 'weed_purplehaze', label = 'Purple Haze 2g', weight = 200, type = 'item', image = 'weed_baggy.png', unique = false, useable = true, shouldClose = false, description = 'A weed bag with 2g Purple Haze' }, - weed_ogkush = { name = 'weed_ogkush', label = 'OGKush 2g', weight = 200, type = 'item', image = 'weed_baggy.png', unique = false, useable = true, shouldClose = false, description = 'A weed bag with 2g OG Kush' }, - weed_amnesia = { name = 'weed_amnesia', label = 'Amnesia 2g', weight = 200, type = 'item', image = 'weed_baggy.png', unique = false, useable = true, shouldClose = false, description = 'A weed bag with 2g Amnesia' }, - weed_ak47 = { name = 'weed_ak47', label = 'AK47 2g', weight = 200, type = 'item', image = 'weed_baggy.png', unique = false, useable = true, shouldClose = false, description = 'A weed bag with 2g AK47' }, - weed_whitewidow_seed = { name = 'weed_whitewidow_seed', label = 'White Widow Seed', weight = 0, type = 'item', image = 'weed_seed.png', unique = false, useable = true, shouldClose = false, description = 'A weed seed of White Widow' }, - weed_skunk_seed = { name = 'weed_skunk_seed', label = 'Skunk Seed', weight = 0, type = 'item', image = 'weed_seed.png', unique = false, useable = true, shouldClose = true, description = 'A weed seed of Skunk' }, - weed_purplehaze_seed = { name = 'weed_purplehaze_seed', label = 'Purple Haze Seed', weight = 0, type = 'item', image = 'weed_seed.png', unique = false, useable = true, shouldClose = true, description = 'A weed seed of Purple Haze' }, - weed_ogkush_seed = { name = 'weed_ogkush_seed', label = 'OGKush Seed', weight = 0, type = 'item', image = 'weed_seed.png', unique = false, useable = true, shouldClose = true, description = 'A weed seed of OG Kush' }, - weed_amnesia_seed = { name = 'weed_amnesia_seed', label = 'Amnesia Seed', weight = 0, type = 'item', image = 'weed_seed.png', unique = false, useable = true, shouldClose = true, description = 'A weed seed of Amnesia' }, - weed_ak47_seed = { name = 'weed_ak47_seed', label = 'AK47 Seed', weight = 0, type = 'item', image = 'weed_seed.png', unique = false, useable = true, shouldClose = true, description = 'A weed seed of AK47' }, - empty_weed_bag = { name = 'empty_weed_bag', label = 'Empty Weed Bag', weight = 0, type = 'item', image = 'weed_baggy_empty.png', unique = false, useable = true, shouldClose = true, description = 'A small empty bag' }, - weed_nutrition = { name = 'weed_nutrition', label = 'Plant Fertilizer', weight = 2000, type = 'item', image = 'weed_nutrition.png', unique = false, useable = true, shouldClose = true, description = 'Plant nutrition' }, + weed_whitewidow = { label = 'White Widow 2g', weight = 200, image = 'weed_baggy.png', useable = true, description = 'A weed bag with 2g White Widow' }, + weed_skunk = { label = 'Skunk 2g', weight = 200, image = 'weed_baggy.png', useable = true, description = 'A weed bag with 2g Skunk' }, + weed_purplehaze = { label = 'Purple Haze 2g', weight = 200, image = 'weed_baggy.png', useable = true, description = 'A weed bag with 2g Purple Haze' }, + weed_ogkush = { label = 'OGKush 2g', weight = 200, image = 'weed_baggy.png', useable = true, description = 'A weed bag with 2g OG Kush' }, + weed_amnesia = { label = 'Amnesia 2g', weight = 200, image = 'weed_baggy.png', useable = true, description = 'A weed bag with 2g Amnesia' }, + weed_ak47 = { label = 'AK47 2g', weight = 200, image = 'weed_baggy.png', useable = true, description = 'A weed bag with 2g AK47' }, + weed_whitewidow_seed = { label = 'White Widow Seed', image = 'weed_seed.png', useable = true, description = 'A weed seed of White Widow' }, + weed_skunk_seed = { label = 'Skunk Seed', image = 'weed_seed.png', useable = true, shouldClose = true, description = 'A weed seed of Skunk' }, + weed_purplehaze_seed = { label = 'Purple Haze Seed', image = 'weed_seed.png', useable = true, shouldClose = true, description = 'A weed seed of Purple Haze' }, + weed_ogkush_seed = { label = 'OGKush Seed', image = 'weed_seed.png', useable = true, shouldClose = true, description = 'A weed seed of OG Kush' }, + weed_amnesia_seed = { label = 'Amnesia Seed', image = 'weed_seed.png', useable = true, shouldClose = true, description = 'A weed seed of Amnesia' }, + weed_ak47_seed = { label = 'AK47 Seed', image = 'weed_seed.png', useable = true, shouldClose = true, description = 'A weed seed of AK47' }, + empty_weed_bag = { label = 'Empty Weed Bag', image = 'weed_baggy_empty.png', useable = true, shouldClose = true, description = 'A small empty bag' }, + weed_nutrition = { label = 'Plant Fertilizer', weight = 2000, useable = true, shouldClose = true, description = 'Plant nutrition' }, -- Material - plastic = { name = 'plastic', label = 'Plastic', weight = 100, type = 'item', image = 'plastic.png', unique = false, useable = false, shouldClose = false, description = 'RECYCLE! - Greta Thunberg 2019' }, - metalscrap = { name = 'metalscrap', label = 'Metal Scrap', weight = 100, type = 'item', image = 'metalscrap.png', unique = false, useable = false, shouldClose = false, description = 'You can probably make something nice out of this' }, - copper = { name = 'copper', label = 'Copper', weight = 100, type = 'item', image = 'copper.png', unique = false, useable = false, shouldClose = false, description = 'Nice piece of metal that you can probably use for something' }, - aluminum = { name = 'aluminum', label = 'Aluminium', weight = 100, type = 'item', image = 'aluminum.png', unique = false, useable = false, shouldClose = false, description = 'Nice piece of metal that you can probably use for something' }, - aluminumoxide = { name = 'aluminumoxide', label = 'Aluminium Powder', weight = 100, type = 'item', image = 'aluminumoxide.png', unique = false, useable = false, shouldClose = false, description = 'Some powder to mix with' }, - iron = { name = 'iron', label = 'Iron', weight = 100, type = 'item', image = 'iron.png', unique = false, useable = false, shouldClose = false, description = 'Handy piece of metal that you can probably use for something' }, - ironoxide = { name = 'ironoxide', label = 'Iron Powder', weight = 100, type = 'item', image = 'ironoxide.png', unique = false, useable = false, shouldClose = false, description = 'Some powder to mix with.' }, - steel = { name = 'steel', label = 'Steel', weight = 100, type = 'item', image = 'steel.png', unique = false, useable = false, shouldClose = false, description = 'Nice piece of metal that you can probably use for something' }, - rubber = { name = 'rubber', label = 'Rubber', weight = 100, type = 'item', image = 'rubber.png', unique = false, useable = false, shouldClose = false, description = 'Rubber, I believe you can make your own rubber ducky with it :D' }, - glass = { name = 'glass', label = 'Glass', weight = 100, type = 'item', image = 'glass.png', unique = false, useable = false, shouldClose = false, description = 'It is very fragile, watch out' }, + plastic = { label = 'Plastic', weight = 100, description = 'RECYCLE! - Greta Thunberg 2019' }, + metalscrap = { label = 'Metal Scrap', weight = 100, description = 'You can probably make something nice out of this' }, + copper = { label = 'Copper', weight = 100, description = 'Nice piece of metal that you can probably use for something' }, + aluminum = { label = 'Aluminium', weight = 100, description = 'Nice piece of metal that you can probably use for something' }, + aluminumoxide = { label = 'Aluminium Powder', weight = 100, description = 'Some powder to mix with' }, + iron = { label = 'Iron', weight = 100, description = 'Handy piece of metal that you can probably use for something' }, + ironoxide = { label = 'Iron Powder', weight = 100, description = 'Some powder to mix with.' }, + steel = { label = 'Steel', weight = 100, description = 'Nice piece of metal that you can probably use for something' }, + rubber = { label = 'Rubber', weight = 100, description = 'Rubber, I believe you can make your own rubber ducky with it :D' }, + glass = { label = 'Glass', weight = 100, description = 'It is very fragile, watch out' }, -- Tools - lockpick = { name = 'lockpick', label = 'Lockpick', weight = 300, type = 'item', image = 'lockpick.png', unique = false, useable = true, shouldClose = true, description = 'Very useful if you lose your keys a lot.. or if you want to use it for something else...' }, - advancedlockpick = { name = 'advancedlockpick', label = 'Advanced Lockpick', weight = 500, type = 'item', image = 'advancedlockpick.png', unique = false, useable = true, shouldClose = true, description = 'If you lose your keys a lot this is very useful... Also useful to open your beers' }, - electronickit = { name = 'electronickit', label = 'Electronic Kit', weight = 100, type = 'item', image = 'electronickit.png', unique = false, useable = true, shouldClose = true, description = 'If you\'ve always wanted to build a robot you can maybe start here. Maybe you\'ll be the new Elon Musk?' }, - gatecrack = { name = 'gatecrack', label = 'Gatecrack', weight = 0, type = 'item', image = 'usb_device.png', unique = false, useable = false, shouldClose = true, description = 'Handy software to tear down some fences' }, - thermite = { name = 'thermite', label = 'Thermite', weight = 1000, type = 'item', image = 'thermite.png', unique = false, useable = true, shouldClose = true, description = 'Sometimes you\'d wish for everything to burn' }, - trojan_usb = { name = 'trojan_usb', label = 'Trojan USB', weight = 0, type = 'item', image = 'usb_device.png', unique = false, useable = false, shouldClose = true, description = 'Handy software to shut down some systems' }, - screwdriverset = { name = 'screwdriverset', label = 'Toolkit', weight = 1000, type = 'item', image = 'screwdriverset.png', unique = false, useable = false, shouldClose = false, description = 'Very useful to screw... screws...' }, - drill = { name = 'drill', label = 'Drill', weight = 20000, type = 'item', image = 'drill.png', unique = false, useable = false, shouldClose = false, description = 'The real deal...' }, + lockpick = { label = 'Lockpick', weight = 300, useable = true, shouldClose = true, description = 'Very useful if you lose your keys a lot.. or if you want to use it for something else...' }, + advancedlockpick = { label = 'Advanced Lockpick', weight = 500, useable = true, shouldClose = true, description = 'If you lose your keys a lot this is very useful... Also useful to open your beers' }, + electronickit = { label = 'Electronic Kit', weight = 100, useable = true, shouldClose = true, description = 'If you\'ve always wanted to build a robot you can maybe start here. Maybe you\'ll be the new Elon Musk?' }, + gatecrack = { label = 'Gatecrack', image = 'usb_device.png', shouldClose = true, description = 'Handy software to tear down some fences' }, + thermite = { label = 'Thermite', weight = 1000, useable = true, shouldClose = true, description = 'Sometimes you\'d wish for everything to burn' }, + trojan_usb = { label = 'Trojan USB', image = 'usb_device.png', shouldClose = true, description = 'Handy software to shut down some systems' }, + screwdriverset = { label = 'Toolkit', weight = 1000, description = 'Very useful to screw... screws...' }, + drill = { label = 'Drill', weight = 20000, description = 'The real deal...' }, -- Vehicle Tools - nitrous = { name = 'nitrous', label = 'Nitrous', weight = 1000, type = 'item', image = 'nitrous.png', unique = false, useable = true, shouldClose = true, description = 'Speed up, gas pedal! :D' }, - repairkit = { name = 'repairkit', label = 'Repairkit', weight = 2500, type = 'item', image = 'repairkit.png', unique = false, useable = true, shouldClose = true, description = 'A nice toolbox with stuff to repair your vehicle' }, - advancedrepairkit = { name = 'advancedrepairkit', label = 'Advanced Repairkit', weight = 4000, type = 'item', image = 'advancedkit.png', unique = false, useable = true, shouldClose = true, description = 'A nice toolbox with stuff to repair your vehicle' }, - cleaningkit = { name = 'cleaningkit', label = 'Cleaning Kit', weight = 250, type = 'item', image = 'cleaningkit.png', unique = false, useable = true, shouldClose = true, description = 'A microfiber cloth with some soap will let your car sparkle again!' }, - tunerlaptop = { name = 'tunerlaptop', label = 'Tunerchip', weight = 2000, type = 'item', image = 'tunerchip.png', unique = true, useable = true, shouldClose = true, description = 'With this tunerchip you can get your car on steroids... If you know what you\'re doing' }, - harness = { name = 'harness', label = 'Race Harness', weight = 1000, type = 'item', image = 'harness.png', unique = true, useable = true, shouldClose = true, description = 'Racing Harness so no matter what you stay in the car' }, - jerry_can = { name = 'jerry_can', label = 'Jerrycan 20L', weight = 20000, type = 'item', image = 'jerry_can.png', unique = false, useable = true, shouldClose = true, description = 'A can full of Fuel' }, - tirerepairkit = { name = 'tirerepairkit', label = 'Tire Repair Kit', weight = 1000, type = 'item', image = 'tirerepairkit.png', unique = false, useable = true, shouldClose = true, description = 'A kit to repair your tires' }, + nitrous = { label = 'Nitrous', weight = 1000, useable = true, shouldClose = true, description = 'Speed up, gas pedal! :D' }, + repairkit = { label = 'Repairkit', weight = 2500, useable = true, shouldClose = true, description = 'A nice toolbox with stuff to repair your vehicle' }, + advancedrepairkit = { label = 'Advanced Repairkit', weight = 4000, image = 'advancedkit.png', useable = true, shouldClose = true, description = 'A nice toolbox with stuff to repair your vehicle' }, + cleaningkit = { label = 'Cleaning Kit', weight = 250, useable = true, shouldClose = true, description = 'A microfiber cloth with some soap will let your car sparkle again!' }, + tunerlaptop = { label = 'Tunerchip', weight = 2000, image = 'tunerchip.png', unique = true, useable = true, shouldClose = true, description = 'With this tunerchip you can get your car on steroids... If you know what you\'re doing' }, + harness = { label = 'Race Harness', weight = 1000, unique = true, useable = true, shouldClose = true, description = 'Racing Harness so no matter what you stay in the car' }, + jerry_can = { label = 'Jerrycan 20L', weight = 20000, useable = true, shouldClose = true, description = 'A can full of Fuel' }, + tirerepairkit = { label = 'Tire Repair Kit', weight = 1000, useable = true, shouldClose = true, description = 'A kit to repair your tires' }, -- Mechanic Parts - veh_toolbox = { name = 'veh_toolbox', label = 'Toolbox', weight = 1000, type = 'item', image = 'veh_toolbox.png', unique = false, useable = true, shouldClose = true, description = 'Check vehicle status' }, - veh_armor = { name = 'veh_armor', label = 'Armor', weight = 1000, type = 'item', image = 'veh_armor.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle armor' }, - veh_brakes = { name = 'veh_brakes', label = 'Brakes', weight = 1000, type = 'item', image = 'veh_brakes.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle brakes' }, - veh_engine = { name = 'veh_engine', label = 'Engine', weight = 1000, type = 'item', image = 'veh_engine.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle engine' }, - veh_suspension = { name = 'veh_suspension', label = 'Suspension', weight = 1000, type = 'item', image = 'veh_suspension.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle suspension' }, - veh_transmission = { name = 'veh_transmission', label = 'Transmission', weight = 1000, type = 'item', image = 'veh_transmission.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle transmission' }, - veh_turbo = { name = 'veh_turbo', label = 'Turbo', weight = 1000, type = 'item', image = 'veh_turbo.png', unique = false, useable = true, shouldClose = true, description = 'Install vehicle turbo' }, - veh_interior = { name = 'veh_interior', label = 'Interior', weight = 1000, type = 'item', image = 'veh_interior.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle interior' }, - veh_exterior = { name = 'veh_exterior', label = 'Exterior', weight = 1000, type = 'item', image = 'veh_exterior.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle exterior' }, - veh_wheels = { name = 'veh_wheels', label = 'Wheels', weight = 1000, type = 'item', image = 'veh_wheels.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle wheels' }, - veh_neons = { name = 'veh_neons', label = 'Neons', weight = 1000, type = 'item', image = 'veh_neons.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle neons' }, - veh_xenons = { name = 'veh_xenons', label = 'Xenons', weight = 1000, type = 'item', image = 'veh_xenons.png', unique = false, useable = true, shouldClose = true, description = 'Upgrade vehicle xenons' }, - veh_tint = { name = 'veh_tint', label = 'Tints', weight = 1000, type = 'item', image = 'veh_tint.png', unique = false, useable = true, shouldClose = true, description = 'Install vehicle tint' }, - veh_plates = { name = 'veh_plates', label = 'Plates', weight = 1000, type = 'item', image = 'veh_plates.png', unique = false, useable = true, shouldClose = true, description = 'Install vehicle plates' }, + veh_toolbox = { label = 'Toolbox', weight = 1000, useable = true, shouldClose = true, description = 'Check vehicle status' }, + veh_armor = { label = 'Armor', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle armor' }, + veh_brakes = { label = 'Brakes', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle brakes' }, + veh_engine = { label = 'Engine', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle engine' }, + veh_suspension = { label = 'Suspension', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle suspension' }, + veh_transmission = { label = 'Transmission', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle transmission' }, + veh_turbo = { label = 'Turbo', weight = 1000, useable = true, shouldClose = true, description = 'Install vehicle turbo' }, + veh_interior = { label = 'Interior', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle interior' }, + veh_exterior = { label = 'Exterior', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle exterior' }, + veh_wheels = { label = 'Wheels', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle wheels' }, + veh_neons = { label = 'Neons', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle neons' }, + veh_xenons = { label = 'Xenons', weight = 1000, useable = true, shouldClose = true, description = 'Upgrade vehicle xenons' }, + veh_tint = { label = 'Tints', weight = 1000, useable = true, shouldClose = true, description = 'Install vehicle tint' }, + veh_plates = { label = 'Plates', weight = 1000, useable = true, shouldClose = true, description = 'Install vehicle plates' }, -- Medication - firstaid = { name = 'firstaid', label = 'First Aid', weight = 2500, type = 'item', image = 'firstaid.png', unique = false, useable = true, shouldClose = true, description = 'You can use this First Aid kit to get people back on their feet' }, - bandage = { name = 'bandage', label = 'Bandage', weight = 0, type = 'item', image = 'bandage.png', unique = false, useable = true, shouldClose = true, description = 'A bandage works every time' }, - ifaks = { name = 'ifaks', label = 'ifaks', weight = 200, type = 'item', image = 'ifaks.png', unique = false, useable = true, shouldClose = true, description = 'ifaks for healing and a complete stress remover.' }, - painkillers = { name = 'painkillers', label = 'Painkillers', weight = 0, type = 'item', image = 'painkillers.png', unique = false, useable = true, shouldClose = true, description = 'For pain you can\'t stand anymore, take this pill that\'d make you feel great again' }, - walkstick = { name = 'walkstick', label = 'Walking Stick', weight = 1000, type = 'item', image = 'walkstick.png', unique = false, useable = true, shouldClose = true, description = 'Walking stick for ya\'ll grannies out there.. HAHA' }, + firstaid = { label = 'First Aid', weight = 2500, useable = true, shouldClose = true, description = 'You can use this First Aid kit to get people back on their feet' }, + bandage = { label = 'Bandage', useable = true, shouldClose = true, description = 'A bandage works every time' }, + ifaks = { label = 'ifaks', weight = 200, useable = true, shouldClose = true, description = 'ifaks for healing and a complete stress remover.' }, + painkillers = { label = 'Painkillers', useable = true, shouldClose = true, description = 'For pain you can\'t stand anymore, take this pill that\'d make you feel great again' }, + walkstick = { label = 'Walking Stick', weight = 1000, useable = true, shouldClose = true, description = 'Walking stick for ya\'ll grannies out there.. HAHA' }, -- Communication - phone = { name = 'phone', label = 'Phone', weight = 700, type = 'item', image = 'phone.png', unique = true, useable = false, shouldClose = false, description = 'Neat phone ya got there' }, - radio = { name = 'radio', label = 'Radio', weight = 2000, type = 'item', image = 'radio.png', unique = true, useable = true, shouldClose = true, description = 'You can communicate with this through a signal' }, - iphone = { name = 'iphone', label = 'iPhone', weight = 1000, type = 'item', image = 'iphone.png', unique = false, useable = false, shouldClose = true, description = 'Very expensive phone' }, - samsungphone = { name = 'samsungphone', label = 'Samsung S10', weight = 1000, type = 'item', image = 'samsungphone.png', unique = false, useable = false, shouldClose = true, description = 'Very expensive phone' }, - laptop = { name = 'laptop', label = 'Laptop', weight = 4000, type = 'item', image = 'laptop.png', unique = false, useable = false, shouldClose = true, description = 'Expensive laptop' }, - tablet = { name = 'tablet', label = 'Tablet', weight = 2000, type = 'item', image = 'tablet.png', unique = false, useable = false, shouldClose = true, description = 'Expensive tablet' }, - fitbit = { name = 'fitbit', label = 'Fitbit', weight = 500, type = 'item', image = 'fitbit.png', unique = true, useable = true, shouldClose = true, description = 'I like fitbit' }, - radioscanner = { name = 'radioscanner', label = 'Radio Scanner', weight = 1000, type = 'item', image = 'radioscanner.png', unique = false, useable = false, shouldClose = true, description = 'With this you can get some police alerts. Not 100% effective however' }, - pinger = { name = 'pinger', label = 'Pinger', weight = 1000, type = 'item', image = 'pinger.png', unique = false, useable = false, shouldClose = true, description = 'With a pinger and your phone you can send out your location' }, - cryptostick = { name = 'cryptostick', label = 'Crypto Stick', weight = 200, type = 'item', image = 'cryptostick.png', unique = true, useable = true, shouldClose = true, description = 'Why would someone ever buy money that doesn\'t exist.. How many would it contain..?' }, + phone = { label = 'Phone', weight = 700, unique = true, description = 'Neat phone ya got there' }, + radio = { label = 'Radio', weight = 2000, unique = true, useable = true, shouldClose = true, description = 'You can communicate with this through a signal' }, + iphone = { label = 'iPhone', weight = 1000, shouldClose = true, description = 'Very expensive phone' }, + samsungphone = { label = 'Samsung S10', weight = 1000, shouldClose = true, description = 'Very expensive phone' }, + laptop = { label = 'Laptop', weight = 4000, shouldClose = true, description = 'Expensive laptop' }, + tablet = { label = 'Tablet', weight = 2000, shouldClose = true, description = 'Expensive tablet' }, + fitbit = { label = 'Fitbit', weight = 500, unique = true, useable = true, shouldClose = true, description = 'I like fitbit' }, + radioscanner = { label = 'Radio Scanner', weight = 1000, shouldClose = true, description = 'With this you can get some police alerts. Not 100% effective however' }, + pinger = { label = 'Pinger', weight = 1000, shouldClose = true, description = 'With a pinger and your phone you can send out your location' }, + cryptostick = { label = 'Crypto Stick', weight = 200, unique = true, useable = true, shouldClose = true, description = 'Why would someone ever buy money that doesn\'t exist.. How many would it contain..?' }, -- Theft and Jewelry - rolex = { name = 'rolex', label = 'Golden Watch', weight = 1500, type = 'item', image = 'rolex.png', unique = false, useable = false, shouldClose = true, description = 'A golden watch seems like the jackpot to me!' }, - diamond_ring = { name = 'diamond_ring', label = 'Diamond Ring', weight = 1500, type = 'item', image = 'diamond_ring.png', unique = false, useable = false, shouldClose = true, description = 'A diamond ring seems like the jackpot to me!' }, - diamond = { name = 'diamond', label = 'Diamond', weight = 1000, type = 'item', image = 'diamond.png', unique = false, useable = false, shouldClose = true, description = 'A diamond seems like the jackpot to me!' }, - goldchain = { name = 'goldchain', label = 'Golden Chain', weight = 1500, type = 'item', image = 'goldchain.png', unique = false, useable = false, shouldClose = true, description = 'A golden chain seems like the jackpot to me!' }, - tenkgoldchain = { name = 'tenkgoldchain', label = '10k Gold Chain', weight = 2000, type = 'item', image = '10kgoldchain.png', unique = false, useable = false, shouldClose = true, description = '10 carat golden chain' }, - goldbar = { name = 'goldbar', label = 'Gold Bar', weight = 7000, type = 'item', image = 'goldbar.png', unique = false, useable = false, shouldClose = true, description = 'Looks pretty expensive to me' }, + rolex = { label = 'Golden Watch', weight = 1500, shouldClose = true, description = 'A golden watch seems like the jackpot to me!' }, + diamond_ring = { label = 'Diamond Ring', weight = 1500, shouldClose = true, description = 'A diamond ring seems like the jackpot to me!' }, + diamond = { label = 'Diamond', weight = 1000, shouldClose = true, description = 'A diamond seems like the jackpot to me!' }, + goldchain = { label = 'Golden Chain', weight = 1500, shouldClose = true, description = 'A golden chain seems like the jackpot to me!' }, + tenkgoldchain = { label = '10k Gold Chain', weight = 2000, image = '10kgoldchain.png', shouldClose = true, description = '10 carat golden chain' }, + goldbar = { label = 'Gold Bar', weight = 7000, shouldClose = true, description = 'Looks pretty expensive to me' }, -- Cops Tools - armor = { name = 'armor', label = 'Armor', weight = 5000, type = 'item', image = 'armor.png', unique = false, useable = true, shouldClose = true, description = 'Some protection won\'t hurt... right?' }, - heavyarmor = { name = 'heavyarmor', label = 'Heavy Armor', weight = 5000, type = 'item', image = 'armor.png', unique = false, useable = true, shouldClose = true, description = 'Some protection won\'t hurt... right?' }, - handcuffs = { name = 'handcuffs', label = 'Handcuffs', weight = 100, type = 'item', image = 'handcuffs.png', unique = false, useable = true, shouldClose = true, description = 'Comes in handy when people misbehave. Maybe it can be used for something else?' }, - police_stormram = { name = 'police_stormram', label = 'Stormram', weight = 18000, type = 'item', image = 'police_stormram.png', unique = false, useable = true, shouldClose = true, description = 'A nice tool to break into doors' }, - empty_evidence_bag = { name = 'empty_evidence_bag', label = 'Empty Evidence Bag', weight = 0, type = 'item', image = 'evidence.png', unique = false, useable = false, shouldClose = false, description = 'Used a lot to keep DNA from blood, bullet shells and more' }, - filled_evidence_bag = { name = 'filled_evidence_bag', label = 'Evidence Bag', weight = 200, type = 'item', image = 'evidence.png', unique = true, useable = false, shouldClose = false, description = 'A filled evidence bag to see who committed the crime >:(' }, + armor = { label = 'Armor', weight = 5000, useable = true, shouldClose = true, description = 'Some protection won\'t hurt... right?' }, + heavyarmor = { label = 'Heavy Armor', weight = 5000, useable = true, shouldClose = true, description = 'Some protection won\'t hurt... right?' }, + handcuffs = { label = 'Handcuffs', weight = 100, useable = true, shouldClose = true, description = 'Comes in handy when people misbehave. Maybe it can be used for something else?' }, + police_stormram = { label = 'Stormram', weight = 18000, useable = true, shouldClose = true, description = 'A nice tool to break into doors' }, + empty_evidence_bag = { label = 'Empty Evidence Bag', image = 'evidence.png', description = 'Used a lot to keep DNA from blood, bullet shells and more' }, + filled_evidence_bag = { label = 'Evidence Bag', weight = 200, image = 'evidence.png', unique = true, description = 'A filled evidence bag to see who committed the crime >:(' }, -- Firework Tools - firework1 = { name = 'firework1', label = '2Brothers', weight = 1000, type = 'item', image = 'firework1.png', unique = false, useable = true, shouldClose = true, description = 'Fireworks' }, - firework2 = { name = 'firework2', label = 'Poppelers', weight = 1000, type = 'item', image = 'firework2.png', unique = false, useable = true, shouldClose = true, description = 'Fireworks' }, - firework3 = { name = 'firework3', label = 'WipeOut', weight = 1000, type = 'item', image = 'firework3.png', unique = false, useable = true, shouldClose = true, description = 'Fireworks' }, - firework4 = { name = 'firework4', label = 'Weeping Willow', weight = 1000, type = 'item', image = 'firework4.png', unique = false, useable = true, shouldClose = true, description = 'Fireworks' }, + firework1 = { label = '2Brothers', weight = 1000, useable = true, shouldClose = true, description = 'Fireworks' }, + firework2 = { label = 'Poppelers', weight = 1000, useable = true, shouldClose = true, description = 'Fireworks' }, + firework3 = { label = 'WipeOut', weight = 1000, useable = true, shouldClose = true, description = 'Fireworks' }, + firework4 = { label = 'Weeping Willow', weight = 1000, useable = true, shouldClose = true, description = 'Fireworks' }, -- Sea Tools - dendrogyra_coral = { name = 'dendrogyra_coral', label = 'Dendrogyra', weight = 1000, type = 'item', image = 'dendrogyra_coral.png', unique = false, useable = false, shouldClose = true, description = 'Its also known as pillar coral' }, - antipatharia_coral = { name = 'antipatharia_coral', label = 'Antipatharia', weight = 1000, type = 'item', image = 'antipatharia_coral.png', unique = false, useable = false, shouldClose = true, description = 'Its also known as black corals or thorn corals' }, - diving_gear = { name = 'diving_gear', label = 'Diving Gear', weight = 30000, type = 'item', image = 'diving_gear.png', unique = true, useable = true, shouldClose = true, description = 'An oxygen tank and a rebreather' }, - diving_fill = { name = 'diving_fill', label = 'Diving Tube', weight = 3000, type = 'item', image = 'diving_tube.png', unique = true, useable = true, shouldClose = true, description = 'An oxygen tube and a rebreather' }, + dendrogyra_coral = { label = 'Dendrogyra', weight = 1000, shouldClose = true, description = 'Its also known as pillar coral' }, + antipatharia_coral = { label = 'Antipatharia', weight = 1000, shouldClose = true, description = 'Its also known as black corals or thorn corals' }, + diving_gear = { label = 'Diving Gear', weight = 30000, unique = true, useable = true, shouldClose = true, description = 'An oxygen tank and a rebreather' }, + diving_fill = { label = 'Diving Tube', weight = 3000, image = 'diving_tube.png', unique = true, useable = true, shouldClose = true, description = 'An oxygen tube and a rebreather' }, -- Other Tools - casinochips = { name = 'casinochips', label = 'Casino Chips', weight = 0, type = 'item', image = 'casinochips.png', unique = false, useable = false, shouldClose = false, description = 'Chips For Casino Gambling' }, - stickynote = { name = 'stickynote', label = 'Sticky note', weight = 0, type = 'item', image = 'stickynote.png', unique = true, useable = false, shouldClose = false, description = 'Sometimes handy to remember something :)' }, - moneybag = { name = 'moneybag', label = 'Money Bag', weight = 0, type = 'item', image = 'moneybag.png', unique = true, useable = true, shouldClose = true, description = 'A bag with cash' }, - parachute = { name = 'parachute', label = 'Parachute', weight = 30000, type = 'item', image = 'parachute.png', unique = true, useable = true, shouldClose = true, description = 'The sky is the limit! Woohoo!' }, - binoculars = { name = 'binoculars', label = 'Binoculars', weight = 600, type = 'item', image = 'binoculars.png', unique = false, useable = true, shouldClose = true, description = 'Sneaky Breaky...' }, - lighter = { name = 'lighter', label = 'Lighter', weight = 0, type = 'item', image = 'lighter.png', unique = false, useable = false, shouldClose = true, description = 'On new years eve a nice fire to stand next to' }, - certificate = { name = 'certificate', label = 'Certificate', weight = 0, type = 'item', image = 'certificate.png', unique = false, useable = false, shouldClose = true, description = 'Certificate that proves you own certain stuff' }, - markedbills = { name = 'markedbills', label = 'Marked Money', weight = 1000, type = 'item', image = 'markedbills.png', unique = true, useable = false, shouldClose = true, description = 'Money?' }, - labkey = { name = 'labkey', label = 'Key', weight = 500, type = 'item', image = 'labkey.png', unique = true, useable = true, shouldClose = true, description = 'Key for a lock...?' }, - printerdocument = { name = 'printerdocument', label = 'Document', weight = 500, type = 'item', image = 'printerdocument.png', unique = true, useable = true, shouldClose = true, description = 'A nice document' }, - newscam = { name = 'newscam', label = 'News Camera', weight = 100, type = 'item', image = 'newscam.png', unique = true, useable = true, shouldClose = true, description = 'A camera for the news' }, - newsmic = { name = 'newsmic', label = 'News Microphone', weight = 100, type = 'item', image = 'newsmic.png', unique = true, useable = true, shouldClose = true, description = 'A microphone for the news' }, - newsbmic = { name = 'newsbmic', label = 'Boom Microphone', weight = 100, type = 'item', image = 'newsbmic.png', unique = true, useable = true, shouldClose = true, description = 'A Useable BoomMic' }, + casinochips = { label = 'Casino Chips', description = 'Chips For Casino Gambling' }, + stickynote = { label = 'Sticky note', unique = true, description = 'Sometimes handy to remember something :)' }, + moneybag = { label = 'Money Bag', unique = true, useable = true, shouldClose = true, description = 'A bag with cash' }, + parachute = { label = 'Parachute', weight = 30000, unique = true, useable = true, shouldClose = true, description = 'The sky is the limit! Woohoo!' }, + binoculars = { label = 'Binoculars', weight = 600, useable = true, shouldClose = true, description = 'Sneaky Breaky...' }, + lighter = { label = 'Lighter', shouldClose = true, description = 'On new years eve a nice fire to stand next to' }, + certificate = { label = 'Certificate', shouldClose = true, description = 'Certificate that proves you own certain stuff' }, + markedbills = { label = 'Marked Money', weight = 1000, unique = true, shouldClose = true, description = 'Money?' }, + labkey = { label = 'Key', weight = 500, unique = true, useable = true, shouldClose = true, description = 'Key for a lock...?' }, + printerdocument = { label = 'Document', weight = 500, unique = true, useable = true, shouldClose = true, description = 'A nice document' }, + newscam = { label = 'News Camera', weight = 100, unique = true, useable = true, shouldClose = true, description = 'A camera for the news' }, + newsmic = { label = 'News Microphone', weight = 100, unique = true, useable = true, shouldClose = true, description = 'A microphone for the news' }, + newsbmic = { label = 'Boom Microphone', weight = 100, unique = true, useable = true, shouldClose = true, description = 'A Useable BoomMic' }, } + +QBShared.Items = {} + +for key, values in pairs(Items) do + QBShared.Items[key] = { + name = values.name or key, + label = values.label or key, + weight = values.weight or 0, + type = values.type or 'item', + image = values.image or ("%s.png"):format(key), + unique = values.unique or false, + useable = values.useable or false, + shouldClose = values.shouldClose or false, + description = values.description or '', + } +end \ No newline at end of file From 7478da8d1b33a37456d9f914939b048e7d747444 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 28 Dec 2024 16:44:46 +0000 Subject: [PATCH 12/13] Added a VehicleHash table to shared to find easily a specific vehicle --- shared/vehicles.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/vehicles.lua b/shared/vehicles.lua index bf6bf8707..470287d33 100644 --- a/shared/vehicles.lua +++ b/shared/vehicles.lua @@ -765,7 +765,10 @@ local Vehicles = { { model = 'formula', name = 'PR4', brand = 'Progen', price = 100000, category = 'openwheel', type = 'automobile', shop = 'none' }, } +QBShared.VehicleHashes = QBShared.VehicleHashes or {} + for i = 1, #Vehicles do + local hash = joaat(Vehicles[i].model) QBShared.Vehicles[Vehicles[i].model] = { spawncode = Vehicles[i].model, name = Vehicles[i].name, @@ -773,8 +776,10 @@ for i = 1, #Vehicles do model = Vehicles[i].model, price = Vehicles[i].price, category = Vehicles[i].category, - hash = joaat(Vehicles[i].model), + hash = hash, type = Vehicles[i].type, shop = Vehicles[i].shop } + + QBShared.VehicleHashes[hash] = QBShared.Vehicles[Vehicles[i].model] end From bf506aeec3d605b8a6419a1967971542cae9fb99 Mon Sep 17 00:00:00 2001 From: Cocodrulo Date: Sat, 28 Dec 2024 16:49:23 +0000 Subject: [PATCH 13/13] Revert other pull request changes --- server/functions.lua | 72 -------------------------------------------- server/player.lua | 41 ------------------------- 2 files changed, 113 deletions(-) diff --git a/server/functions.lua b/server/functions.lua index b7b969185..9cfe78e76 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -721,75 +721,3 @@ function QBCore.Functions.PrepForSQL(source, data, pattern) end return true end - ----Do a money transactio between players ----@param sourcecid string ----@param sourcemoneytype string -- Only money types in QBConfig.Money.MoneyTypes ----@param targetcid string ----@param targetmoneytype string -- Only money types in QBConfig.Money.MoneyTypes ----@param amount number ----@param reason string ----@return boolean -function QBCore.Functions.TransferMoney(sourcecid, sourcemoneytype, targetcid, targetmoneytype, amount, reason) - local SourcePlayer = QBCore.Functions.GetPlayerByCitizenId(sourcecid) - local TargetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetcid) - if not tonumber(amount) then return false end - amount = tonumber(amount) or 0 - if tonumber(amount) <= 0 then return true end - local errorOnLast = false - if SourcePlayer then - if not SourcePlayer.Functions.RemoveMoney(amount, sourcemoneytype, reason) then return false end - else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { sourcecid }) - if not result then return false end - result = json.decode(result) - result[sourcemoneytype] -= amount - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), sourcecid }) then errorOnLast = true end - end - if TargetPlayer then - if not TargetPlayer.Functions.AddMoney(amount, targetmoneytype, reason) then errorOnLast = true end - else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { targetcid }) - if not result then errorOnLast = true end - result = json.decode(result) - result[targetmoneytype] += amount - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), targetcid }) then errorOnLast = true end - end - - if errorOnLast then - if SourcePlayer then - if not SourcePlayer.Functions.AddMoney(amount, sourcemoneytype, reason) then return false end - else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { sourcecid }) - if not result then return false end - result = json.decode(result) - result[sourcemoneytype] += amount - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), sourcecid }) then return false end - end - return false - end - - if SourcePlayer then - TriggerClientEvent('hud:client:OnMoneyChange', SourcePlayer.PlayerData.source, sourcemoneytype, true) - TriggerClientEvent('QBCore:Client:OnMoneyChange', SourcePlayer.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) - TriggerEvent('QBCore:Server:OnMoneyChange', SourcePlayer.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) - end - - if TargetPlayer then - TriggerClientEvent('hud:client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, true) - TriggerClientEvent('QBCore:Client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) - TriggerEvent('QBCore:Server:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) - end - - if not SourcePlayer and not TargetPlayer then - TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. sourcecid .. '** gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. targetcid .. '** reason: ' .. reason .. ' | (Both offline)') - elseif not TargetPlayer and SourcePlayer then - TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(SourcePlayer.PlayerData.source) .. ' (citizenid: ' .. SourcePlayer.PlayerData.citizenid .. ' | id: ' .. SourcePlayer.PlayerData.source .. ')**, new balance: ' .. SourcePlayer.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. targetcid .. ' in ('..targetmoneytype..') reason: ' .. reason .. ' | (Target offline)') - elseif not SourcePlayer and TargetPlayer then - TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. sourcecid .. '** gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. GetPlayerName(TargetPlayer.PlayerData.source) .. ' (citizenid: ' .. TargetPlayer.PlayerData.citizenid .. ' | id: ' .. TargetPlayer.PlayerData.source .. ')**, new balance: ' .. TargetPlayer.PlayerData.money[targetmoneytype] .. ' in ('..targetmoneytype..') reason: ' .. reason .. ' | (Source offline)') - elseif SourcePlayer and TargetPlayer then - TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(SourcePlayer.PlayerData.source) .. ' (citizenid: ' .. SourcePlayer.PlayerData.citizenid .. ' | id: ' .. SourcePlayer.PlayerData.source .. ')**, new balance: ' .. SourcePlayer.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. GetPlayerName(TargetPlayer.PlayerData.source) .. ' (citizenid: ' .. TargetPlayer.PlayerData.citizenid .. ' | id: ' .. TargetPlayer.PlayerData.source .. ')**, new balance: ' .. TargetPlayer.PlayerData.money[targetmoneytype] .. ' in ('..targetmoneytype..') reason: ' .. reason) - end - - return true -end diff --git a/server/player.lua b/server/player.lua index 6f4354371..cbc503222 100644 --- a/server/player.lua +++ b/server/player.lua @@ -382,47 +382,6 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline) return true end - function self.Functions.TransferMoneyTo(sourcemoneytype, targetcid, targetmoneytype, amount, reason) - local TargetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetcid) - if not tonumber(amount) then return false end - amount = tonumber(amount) or 0 - if amount <= 0 then return true end - local errorOnLast = false - if not self.Functions.RemoveMoney(amount, sourcemoneytype, reason) then return false end - if TargetPlayer then - if not TargetPlayer.Functions.AddMoney(amount, targetmoneytype, reason) then errorOnLast = true end - else - local result = MySQL.single.await('SELECT money FROM players WHERE citizendid = ?', { targetcid }) - if not result then errorOnLast = true end - result = json.decode(result) - result[targetmoneytype] += amount - if not MySQL.update.await('UPDATE players SET money = ? WHERE citizenid = ?', { json.encode(result), targetcid }) then errorOnLast = true end - end - - if errorOnLast then - self.Functions.AddMoney(amount, sourcemoneytype, reason) - return false - end - - TriggerClientEvent('hud:client:OnMoneyChange', self.PlayerData.source, sourcemoneytype, true) - TriggerClientEvent('QBCore:Client:OnMoneyChange', self.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) - TriggerEvent('QBCore:Server:OnMoneyChange', self.PlayerData.source, sourcemoneytype, amount, 'transfer', reason) - - if TargetPlayer then - TriggerClientEvent('hud:client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, true) - TriggerClientEvent('QBCore:Client:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) - TriggerEvent('QBCore:Server:OnMoneyChange', TargetPlayer.PlayerData.source, targetmoneytype, amount, 'transfer', reason) - end - - if not TargetPlayer then - TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')**, new balance: ' .. self.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. targetcid .. ' in ('..targetmoneytype..') reason: ' .. reason .. ' | (Target offline)') - elseif TargetPlayer then - TriggerEvent('qb-log:server:CreateLog', 'playermoney', 'TransferMoney', 'yellow', '**' .. GetPlayerName(self.PlayerData.source) .. ' (citizenid: ' .. self.PlayerData.citizenid .. ' | id: ' .. self.PlayerData.source .. ')**, new balance: ' .. self.PlayerData.money[sourcemoneytype] .. ' gived $' .. amount .. ' (' .. sourcemoneytype .. ') to **' .. GetPlayerName(TargetPlayer.PlayerData.source) .. ' (citizenid: ' .. TargetPlayer.PlayerData.citizenid .. ' | id: ' .. TargetPlayer.PlayerData.source .. ')**, new balance: ' .. TargetPlayer.PlayerData.money[targetmoneytype] .. ' in ('..targetmoneytype..') reason: ' .. reason) - end - - return true - end - function self.Functions.GetMoney(moneytype) if not moneytype then return false end moneytype = moneytype:lower()