Config file

--[[ 
    - this script needs tgiann-core script to work, you can download the script from your keymaster account
      Start tgiann-core script after es_extented/qb-core script and before tgiann-* scripts
      Adjust the tgiann-core config file according to the framework you are using
      
    client Event List
        - tgiann-market:openCloseBlips - toggles market blips
]]

config = {}
config.buyDay = 30 -- rental day duration
config.test = false 
config.itemIMGLocation = "qb-inventory/html/images" -- img location
config.marketSellPercent = 0.7 -- market resale price multiplier
config.earnMoneyDefaultItems = false -- let the market owner earn money from selling default items
config.defaultPed = `mp_m_shopkeep_01`

config.moneyType = {
    moneyDeposit = "cash",
    moneyWithdraw = "cash",
    sellmarket = "bank",
    sellItem = "cash",
    buyItem = "cash",
    buyMarket = "bank",
}

config.lang = "en" -- "tr"      -       "en"
config.langText = {
    tr = {
        market = "Market",
        marketblip = "Market",
        buyedMarket = "Market Satın Alındı",
        noMoney = "Yeterli Miktarda Paran Yok!",
        someoneOwn = "Market Başkasına Ait",
        itemBuyed = "%s Adet %s %s$ Karşılığında Satın Alındı",
        noMoneyForItems = "Satın alabilmen İçin Üzerinde %s$ Para Olması Lazım",
        noStockMarketAmountItem = "Market Stoğunda %s Tane %s Yok!",
        noStockMarketItem = "Satın Almaya Çalıştığın Eşya Stokta Yok!",
        noPlayerAmountItem = "Üzerinde %s Tane %s Yok!",
        itemSold = "%s Adet %s %s$ Karşılığında Satıldı",
        noMoneyMarket = "Market Kasında Yeterli Miktarda Para Yok!",
        noNeedAnyMoreItem = "Market Sahibi Bu Eşyadan Daha Fazla Satın Almak İstemiyor!",
        noNeedAmountItem = "Market Sahibi %s Adet %s Satın Almak İstemiyor!",
        addedBossSell = "%s Adet %s %s$ Fiyatından Market Rafına Eklendi!",
        addedUpdatedBossSell = "%s Adet %s Market Rafına Eklendi ve Fiyatı %s$ Olarak Güncellendi",
        noItemForBossSell = "Üzerinde %s Adet %s Yok!",
        addedBossBuy = "%s Adet %s %s$ Fiyatından Eşya Sat Rafına Eklendi!",
        addedUpdatedBossBuy = "%s Adet %s Eşya Sat Rafına Eklendi ve Fiyatı %s$ Olarak Güncellendi",
        noUpdatedBuyItem = "Fiyatını Güncellemek İstediğin Eşya Marketinde Yok!",
        UpdatedBuyItem = "%s Eşyasının Fiyatı %s$ Olarak Güncellendi",
        buyNoItemRemove = "Kaldırmak İstediğin Eşya Marketinde Yok!",
        removedBuyItem = "%s Adet %s Eşyası Eşya Sat Rafından Kaldırdın!",
        sellNoItemUpdate = "Fiyatını Güncellemek İstediğin Eşya Marketinde Yok!",
        sellItemPriceUpdated = "%s Eşyasının Fiyatı %s$ Olarak Güncellendi",
        sellItemRemoved = "%s Adet %s Eşyası Eşya Satın Al Rafından Kaldırdın!",
        tooHeavy = "Eşyalar Fazla Ağır",
        noSellItemRemove = "Rafta %s Adet %s Yok!",
        noStorageItem = "Almak İstediğin Eşya Depoda Yok!",
        storageItemRemoved = "%s Adet %s Eşyasını Depodan Aldın!",
        noStorageItem = "Depoda %s Adet %s Yok!",
        moneyWithdraw = "Kasadan %s$ Çektin!",
        moneyWithdrawError = "Kasada Çekmek İstediğin Miktarda Para Yok!",
        moneyDeposit = "Kasaya %s$ Yatırdın!",
        moneyDepositError = "Banka Hesabında Yatırmak İstediğin Miktarda Para Yok!",
        handover = "Marketi Devrettin!",
        handoverError = "Oyuncu Online Değil!",
        sellMarket = "Marketi %s$ Karşılığında Sattın",
        noNearbyPlayer = "Yakınlarında Oyuncu Yok",
        ui = {
            urbalance = "Kasadaki Miktar",
            buy = "Satın Al",
            cancel = "İptal",
            sell = "Sat",
            yes = "Evet",
            withdraw = "Parayı Çek",
            deposit = "Para Yatır",
            handoverText = "Marketi Yanındaki Oyuncuya Devretmek İstediğine Emin misin?",
            buyIyem = "Eşya Satın Al",
            sellItem = "Eşya Sat",
            boss = "Patron İşlemleri",
            buyMarket = "Marketi Satın Al",
            marketSettings = "Market Ayarları",
            sellMarket = "Marketi Sat",
            handoverMarket = "Marketi Devret",
            buyShelf = "Satın Al Rafı",
            sellShelf = "Eşya Sat Rafı",
            addBuyShelf = "Satın Al Rafına Ekle",
            addSellShelf = "Eşya Sat Rafına Ekle",
            price = "Fiyat",
            amount = "Adet",
            itemAmount = "Eşya Adeti!",
            moneyAmount = "Para Miktarı!",
            rentEndTime = "Kiranın Bitiş Tarihi",
            storageItems = "Depodaki Eşyalar",
            getItemAmont = "Alınacak Eşya Adeti",
            getItemFromStorage = "Depodan Eşyayı Al",
            buyMarketText = "{0} Numaralı Marketi {1} Karşılığında {2} Günlüğüne{3} Kiralamak İstiyor musun?",
            itemPrice = "Eşya Fiyatı!",
            removeItemAmount = "Kaldırılacak Eşya Adeti",
            update = "Güncelle",
            remove = "Kaldır",
            buyItemText = "Kaç Adet {0} Satın Almak İstiyorsun?",
            sellItemText = "Kaç Adet {0} Satmak İstiyorsun?",
            marketSellText = "Marketi {0}$ Karşılığında Satmak İstediğine Emin misin?",
            plsSelectItem = "Bir Eşya Seçin",
        }
    },
    en = {
        market = "Market",
        marketblip = "Market",
        buyedMarket = "Market Bought",
        noMoney = "You Don't Have Enough Money!",
        someoneOwn = "Market Belongs to Someone Else",
        itemBuyed = "%s %s Purchased for $%s",
        noMoneyForItems = "You Must Have %s$ Money On It To Buy",
        noStockMarketAmountItem = "No %s %s in Market Stock!",
        noStockMarketItem = "The item you are trying to buy is out of stock!",
        noPlayerAmountItem = "No %s %s on it!",
        itemSold = "%s %s Sold for $%s",
        noMoneyMarket = "There Is Not Enough Money In The Market!",
        noNeedAnyMoreItem = "Market Owner Doesn't Want To Buy More Of This Item!",
        noNeedAmountItem = "Market Owner Doesn't Want to Buy %s %s!",
        addedBossSell = "%s pieces of %s have been added to the market shelf at the price of %s$!" ,
        addedUpdatedBossSell = "%s %s Added to the Market Shelf and Updated to $%s",
        noItemForBossSell = "No %s %s in your inventory!",
        addedBossBuy = "%s %s Have Been Added to the Item Sell Shelf for $%s!",
        addedUpdatedBossBuy = "Added %s %s to the Item Selling Shelf and Updated the Price to $%s",
        noUpdatedBuyItem = "The item you want to update the price of is not in the market!",
        UpdatedBuyItem = "%s Item Price Updated to $%s",
        buyNoItemRemove = "The item you want to remove is not in the Market!",
        removedBuyItem = "You've Removed %s %s Items from the Item Sell Shelf!",
        sellNoItemUpdate = "The item you want to update the price of is not in the market!",
        sellItemPriceUpdated = "%s Item Price Updated to $%s",
        sellItemRemoved = "%s %s Items Buy Item You Removed From Shelf!",
        tooHeavy = "Items Too Heavy",
        noSellItemRemove = "No %s %s on the Shelf!",
        noStorageItem = "The item is not in the storage!",
        storageItemRemoved = "You Received %s %s Items from the Storage!",
        noStorageItem = "No %s %s in the Storage!",
        moneyWithdraw = "You've withdrawn %s$ from the safe!",
        moneyWithdrawError = "There is no amount of money you want to withdraw in the safe!",
        moneyDeposit = "You deposited %s$ in the safe!",
        moneyDepositError = "There is no amount of money you want to deposit in your bank account!",
        handover = "You Transferred the Market!",
        handoverError = "Player Not Online!",
        sellMarket = "You Sold the Market for %s$",
        noNearbyPlayer = "No Players Nearby",
        ui = {
            urbalance = "Your Balance",
            cancel = "Cancel",
            sell = "Sell",
            yes = "Yes",
            withdraw = "Withdraw Money",
            deposit = "Deposit Money",
            handoverText = "Are you sure you want to transfer the market to the nearby player?",
            buyIyem = "Buy Items",
            sellItem = "Sell Items",
            boss = "Boss Menu",
            buyMarket = "Buy Market",
            marketSettings = "Market Settings",
            sellMarket = "Sell the Market",
            handoverMarket = "Transfer Market",
            buyShelf = "Buy Shelf",
            sellShelf = "Sell Shelf",
            addBuyShelf = "Add to Buy Shelf",
            addSellShelf = "Add to Sell Shelf",
            itemAmount = "Item Amount!",
            moneyAmount = "Money!",
            rentEndTime = "Lease End Date",
            storageItems = "Items in Storage",
            amount = "Amount",
            getItemAmont = "Item Amount",
            getItemFromStorage = "Get Item from Storage",
            buyMarketText = "Want to Rent the #{0} Grocery Market for ${1} for {2} Days{3}?",
            price = "Price",
            itemPrice = "Item Price!",
            removeItemAmount = "Number of Items to be Removed",
            buy = "Buy",
            update = "Update",
            remove = "Remove",
            buyItemText = "How Many {0} Do You Want To Buy?",
            sellItemText = "How Many {0} Do You Want to Sell?",
            marketSellText = "Are You Sure You Want To Sell The Market For ${0}?",
            plsSelectItem = "Choose an Item",
        }
    }
}

config.weaponBlacklist = false
config.blackListItems = {
    "water",
    "marijuana",
    "fixkit",
}

config.whiteListItems = {
    "packaged_plank",
}

config.defaultItems = { 
    {
        name = "sandwich",
        price = 13,
    },
    {
        name = "phone",
        price = 50,
    },
}

--[[ 
    coords = Market coords (vector4)
    price = Market Buy price (int)
    defaultItems = Default items sold in the market (table)
    blackListItems = prevents items on the list from being sold (table)
    whiteListItems = only items on the list can be sold (table)
    blip = visibility of the market's blib on the map (bool) (true/false)
    name = The name of the market displayed on the map (string)
    ped = Custom ped (hash)
    maxDistance = E menu display distance (int)
    pressDistance = E menu press distance (int)
]]

config.markets = {
    {
        coords = vector4(-2539.27, 2314.18, 33.41, 110.0),
        price = 12500,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true,
    },
    {
        coords = vector4(-1434.26, -1565.44, 2.73, 71.13),
        price = 15000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-93.37, 6410.17, 31.64, 38.60),
        price = 5000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1776.85, 3327.74, 41.43, 300.33),
        price = 10000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(372.5, 326.38, 103.57, 259.11),
        price = 19000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1727.87, 6415.33, 35.04, 257.04),
        price = 6500,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1164.05, 2710.82, 38.16, 168.71),
        price = 11000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-3242.13, 999.94, 12.83, 356.05),
        price = 13500,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(549.11,2671.36,42.16,91.71),
        price = 10500,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(24.5,-1347.42,29.5,268.89),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1134.43,-984.21,46.42,281.13),
        price = 19000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1960.16,3739.8,32.34,305.57),
        price = 12000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1696.71,4923.9,42.06,325.76),
        price = 9000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-1819.0,792.95,138.08,141.07),
        price = 14000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-706.17,  -915.28,  19.22,87.72),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1165.04,  -324.46,  69.21,106.59),
        price = 18000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-47.84,   -1759.27, 29.42,52.91),
        price = 18500,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(2678.30, 3279.21, 55.24,333.63),
        price = 12000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-2966.26, 392.58,   15.04,84.32),
        price = 16000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(1391.04,  3605.72,  34.98,208.07),
        price = 10500,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-1487.61, -376.58,  40.16,138.92),
        price = 19000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(-3038.80, 584.54,  7.91,19.75),
        price = 12000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(2557.47,  380.74,  108.62,4.04),
        price = 16000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },
    {
        coords = vector4(812.46, -783.37, 26.17, 303.48),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
        blip = true
    },

    --Gabz Market
    {
        coords = vector4(-1198.7, -1515.87, 4.38, 120.11),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1202.43, -1510.42, 4.37, 120.97),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1207.62, -1509.31, 4.37, 33.08),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1207.95, -1502.45, 4.37, 123.61),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1217.37, -1494.7, 4.37, 34.38),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1221.13, -1489.73, 4.37, 30.27),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1225.51, -1484.92, 4.37, 28.77),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1227.33, -1474.72, 4.37, 123.89),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1216.31, -1468.13, 4.37, 300.19),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1210.98, -1464.97, 4.37, 295.62),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1206.09, -1460.55, 4.37, 296.13),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1196.28, -1458.57, 4.38, 32.61),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1218.38, -1430.07, 4.37, 217.07),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1224.15, -1434.2, 4.37, 211.88),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1225.28, -1439.57, 4.37, 113.72),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1232.5, -1439.96, 4.37, 210.59),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1245.92, -1454.59, 4.37, 35.3),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1248.85, -1449.2, 4.37, 56.38),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1253.51, -1444.53, 4.37, 31.13),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1255.45, -1434.56, 4.37, 120.4),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1262.54, -1424.69, 4.37, 129.27),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1265.92, -1419.75, 4.37, 126.87),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1271.66, -1418.34, 4.37, 48.75),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },
    {
        coords = vector4(-1271.77, -1411.33, 4.37, 125.27),
        price = 20000,
        defaultItems = config.defaultItems,
        blackListItems = config.blackListItems,
    },

    --İllegal Markets
    {
        coords = vector4(926.8, -2376.17, 22.32, 176.58),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `cs_jimmyboston`
    },
    {
        coords = vector4(929.33, -2376.31, 22.32, 180.7),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `cs_lamardavis`
    },
    {
        coords = vector4(932.51, -2376.35, 22.32, 167.09),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `cs_nervousron`
    },
    {
        coords = vector4(936.32, -2376.72, 22.32, 174.0),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `cs_russiandrunk`
    },
    {
        coords = vector4(939.48, -2376.97, 22.32, 172.5),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `cs_taocheng`
    },
    {
        coords = vector4(942.46, -2377.24, 22.32, 180.61),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `cs_tom`
    },
    {
        coords = vector4(946.13, -2377.69, 22.32, 172.65),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `csb_ballasog`
    },
    {
        coords = vector4(949.15, -2377.82, 22.32, 179.86),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `csb_dix`
    },
    {
        coords = vector4(952.35, -2378.09, 22.32, 183.18),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `csb_groom`
    },
    {
        coords = vector4(955.95, -2378.7, 22.32, 169.64),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `csb_paige`
    },
    {
        coords = vector4(958.92, -2378.66, 22.32, 187.42),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `csb_ramp_gang`
    },
    {
        coords = vector4(962.31, -2379.0, 22.32, 171.52),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_y_salvagoon_01`
    },
    {
        coords = vector4(969.04, -2379.64, 22.32, 177.55),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_y_mexgoon_02`
    },

    {
        coords = vector4(972.1, -2379.83, 22.32, 178.39),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_y_lost_02`
    },
    {
        coords = vector4(975.84, -2380.14, 22.32, 176.49),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_y_korean_01`
    },
    {
        coords = vector4(978.81, -2380.43, 22.32, 180.74),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_y_azteca_01`
    },
    {
        coords = vector4(981.71, -2380.69, 22.32, 181.77),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_m_korboss_01`
    },
    {
        coords = vector4(943.27, -2391.29, 22.32, 354.85),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_m_armgoon_01`
    },
    {
        coords = vector4(923.91, -2390.34, 22.32, 277.73),
        price = 8000,
        whiteListItems = config.whiteListItems,
        maxDistance = 2,
        pressDistance = 1,
        ped = `g_m_importexport_01`
    },
}

Last updated