Configuration

Contenu de config.lua

Bienvenue dans la configuration de aTebexShop ! Pour commencer à configurer votre nouvelle ressource, veuillez lire attentivement chaque étape de la documentation, que nous joindrons à la fin de ce message.

Si vous ne comprenez pas certaines variables, merci de vous référer à cette section. J'ai créé cette catégorie spécialement pour vous. J'y explique l'utilité de chaque variable, ce qui est crucial pour une bonne configuration.

Ce n'est pas tout, pour la plupart des configurations, vous êtes libre de les modifier à votre guise et de les adapter à votre environnement de travail de la manière la plus confortable possible. Le fichier configurable s'appelle config.lua.

Lien direct vers la documentation, à lire avant de commencer : Documentation aTebexShop

_Config = {
    -- == Config Menu == --
    useMenu = false, -- true = activer | false = désactiver // Activer ou désactiver le menu boutique mais laisse que le button administration
    framework = "newESX", -- newESX or ESX 
    getESX = "esx:getSharedObject", -- Get ESX // si vous utiliser newESX celui-ci ne fonctionnera pas donc laisser le comme il est
    OpenMenu = "h", -- Ouverture du menu
    ImageLogServer = "https://i.goopics.net/yl14w8.gif", -- Image du log serveur (Site web pour héberger vos image pour les mettre ici -->> https://www.zupimages.net/)
    char_ = "CHAR_SOCIAL_CLUB", -- Char_ for notification Client_side & Server_side (https://wiki.gtanet.work/index.php?title=Notification_Pictures)
    Notification = 'NewESX', -- Les options peuvent être 'NewESX', 'okokNotify', ou 'ESX'
    actifBannierre = true, -- Activer la bannière (true = oui | false = non)
    actifTitreMenu = true, -- Activer le titre du menu (true = oui | false = non)
    textureName = 'root_cause',
    fichierYTD = 'ahero_red',
    taille_menu = 0.0, -- Taille du menus 0 - 100 maximums 
    position_menus = {verticale = 0, horizontale = 100}, -- position des menus
    color_menu = {r = 20, g = 0, b = 0}, -- changé la couleur ? go https://htmlcolorcodes.com/fr/

    -- == NE PAS TOUCHE == --
    vipRank = 0, 
    FiveMID = {},
    fivemID_Players = {},
    points = 0, 
    expiration = 0,
    tebex_accounts = {},
    vipRank_ply = 0,
    expiration_ply = 0,
    points_ply = 0,
    player_history_achat = {},
    count_id = 0,
    enableErrorsLog = true,
    enableSqlLog = true,

    -- == Gestion vipRank == --
    LabelRankVIP = {
        [0] = "~c~Aucun~s~",
        [1] = "~y~Vip Gold~s~",
        [2] = "~b~Vip Diamant~s~",
    },

    -- == Webhooks == --
    webhooks = {
        ["achat_arme"] = { w = "" },
        ["achat_veh"] = { w = "" },
        ["player_reçu_caisse_millenium"] = { w = "" },
        ["achat_packs"] = { w = "" },
        ["achat_vip_gold"] = { w = "" },
        ["achat_vip_diamond"] = { w = "" },
        ["staff_send_pb_player"] = { w = "" },
        ["staff_clear_pb_player"] = { w = "" },
        ["staff_add_player_vip_gold"] = { w = "" },
        ["staff_add_player_vip_diamant"] = { w = "" },
        ["staff_add_player_clear_vip"] = { w = "" },
        ["achat_via_le_site_web"] = { w = "" },
    },

    -- == Config Admins == --
    menuPermissions = {
        ["acces_admin"] = {"_dev", "superadmin","admin"}, -- accès au button [Administration]
        ["acces_admin_give_remove_pb"] = {"_dev", "superadmin","admin"}, -- accès [Give/Remove] point boutique
        ["acces_admin_add_VIP"] = {"_dev", "superadmin","admin"}, -- accès [Add player VIP]
        ["acces_admin_remove_VIP"] = {"_dev", "superadmin","admin"}, -- accès [Remove player VIP]
    },

    -- == Zone Safe == --
    SafeZonePrevizuShop = { 
        {pos = vector3(220.07472229004, -810.75164794922, 30.627807617188),dst = 30.0,},
    },

    -- == Gestion Véhicules == --
    useExport_aGarageBuilder = true, 
    vizu_veh = { 
        {model = "panto", label = "Panto du seigneur", price = 150},
        {model = "t20", label = "La T20 de l'enfer", price = 1},
        {model = "baller7", label = "Baller 7", price = 1},
        {model = "luxor2", label = "Luxor Deluxe", price = 1},
        {model = "seashark3", label = "Seashark", price = 1},
    },
    rotate = false, -- Ne pas touché
    rotate_tourne = 0.30, -- Ne pas touché
    entity = 0, -- Ne pas touché
    model = "", -- Ne pas touché
    previewCoords = vector4(-75.468132019042, -818.71649169922, 326.17358398438, 223.9),
    camPos = vector3(-68.808792114258, -818.08349609375, 330.25122070312),

    -- == Essaie Véhicules == --
    position_text = vector4(-74.7, -818.7, 324.7, 243.7),
    text = "Procéder à un essai avec un véhicule, appuyez sur le bouton [~y~G~s~]",
    textTaille = 1.5,
    spawnEssaieVeh = vector4(-1139.8681640625, -3390.6594238282, 13.9296875, 345.8),
    timerEssaie = 1, -- minutes

    -- == Gestion des Ames == --
    licensevizu_caisse = false, -- Ne pas touché
    IndexAddRemovePB = 1, -- Ne pas touché
    IndexAddRemoveVIP = 1, -- Ne pas touché
    IndexWeapon = 1, -- Ne pas touché
    IndexWeaponAchat = 1, -- Ne pas touché
    TimeDeletePedClone = 1, -- Ne pas touché
    armes = {
        {name = "WEAPON_MINIGUN", label = "Mini-Gun", price = 1500, ammo = 250},
        {name = "WEAPON_RPG", label = "RPG", price = 2500, ammo = 20},
        {name = "WEAPON_RAILGUN", label = "RailGun", price = 3500, ammo = 20},
    },

    -- == Facturation en Base de donnée == --
    addDbFacturationDb_arme = true, 
    addDbFacturationDb_voiture = true, 
    addDbFacturationDb_caisse = true, 
    addDbFacturationDb_pack = true, 
    addDbFacturationDb_vip = true, 
    addDbFacturationDb_admin_give_remove_pb = true, 
    addDbFacturationDb_admin_give_VIP = true, 
    addDbFacturationDb_admin_remove_VIP = true, 

    -- == Gestion VIPS == --
    activateMessageSpamPLayerVIP = true, 
    gestionVIP = {
        vip_gold = {
            label = "%sVIP ~y~GOLD~s~",
            price = 1500,
            description = "Prix : ~o~1 500 PB~s~",
            notification_server = "Vous avez reçu :\n -VIP : %s",
            rankVIP = 1,
            spamMessage = "N'hésitez pas à vous rendre dans notre boutique avec la touche ~b~H~s~.",
        },
        vip_diamond = {
            label = "%sVIP ~b~DIAMOND~s~",
            price = 3000,
            description = "Prix : ~o~3 000 PB~s~",
            notification_server = "Vous avez reçu :\n -VIP+ : %s",
            rankVIP = 2,
            spamMessage = "N'hésitez pas à vous rendre dans notre boutique avec la touche ~b~H~s~.",
        },
    },

    -- == Nos Pack == --
    nosPack = {
        {
            label = "Pack de démarrage",
            price = 1000,
            description = "Prix : ~o~1 000 PB~s~\nDescriptions :\n→ Bati801\n→ 50.000 $ argent en banque\n→ 50 Eau et Pain",
            notification_server = "Vous avez reçu :\n -Bati801 : %s\n-50.000 $ Banque\n-50x Eau et Pain",
            items = {
                {car = "bati", label = "Bati801", quantity = 1},
                {item = "bread", label = "Pain", quantity = 50},
                {item = "water", label = "Eau", quantity = 50},
                {money = "money", label = "Argent en banque", quantity = 50000},
            },
            onSelecte = function () 
                if _Config.points >= _Config.nosPack[1].price then
                    spamCar(_Config.nosPack[1].items[1].car, _Config.nosPack[1].items[2].item, _Config.nosPack[1].items[2].quantity, _Config.nosPack[1].items[3].item, _Config.nosPack[1].items[3].quantity, _Config.nosPack[1].items[4].money, _Config.nosPack[1].items[4].quantity, _Config.nosPack[1].notification_server, _Config.nosPack[1].label, _Config.nosPack[1].price)
                    Ahero.toServer("Ahero:removePOINTS", _Config.nosPack[1].price)
                else
                    ESX.ShowAdvancedNotification('🛒 Boutique', "Information", "~r~Vous n'avez pas assez de point boutique~s~", 'CHAR_SOCIAL_CLUB', 1)
                end
            end,    
        },
        {
            label = "Pack Bronze",
            price = 2000,
            description = "Prix : ~o~2 000 PB~s~\nDescriptions :\n→ Nero RS\n→ 100.000 $ argent en banque\n→ 50 Eau et Pain",
            notification_server = "Vous avez reçu :\n -Nero RS : %s\n-100.000 $ Banque\n-50x Eau et Pain",
            items = {
                {car = "nero2", label = "Nero RS", quantity = 1},
                {item = "bread", label = "Pain", quantity = 50},
                {item = "water", label = "Eau", quantity = 50},
                {money = "money", label = "Argent en banque", quantity = 100000},
            },
            onSelecte = function ()            
                if _Config.points >= _Config.nosPack[2].price then
                    spamCar(_Config.nosPack[2].items[1].car, _Config.nosPack[2].items[2].item, _Config.nosPack[2].items[2].quantity, _Config.nosPack[2].items[3].item, _Config.nosPack[2].items[3].quantity, _Config.nosPack[2].items[4].money, _Config.nosPack[2].items[4].quantity, _Config.nosPack[2].notification_server, _Config.nosPack[2].label, _Config.nosPack[2].price)
                    Ahero.toServer("Ahero:removePOINTS", _Config.nosPack[2].price)
                else
                    ESX.ShowAdvancedNotification('🛒 Boutique', "Information", "~r~Vous n'avez pas assez de point boutique~s~", 'CHAR_SOCIAL_CLUB', 1)
                end
            end,    
        },
        {
            label = "Pack Argent",
            price = 3000,
            description = "Prix : ~o~3 000 PB~s~\nDescriptions :\n→ Sanchez (moto)\n→ 250.000 $ argent en banque\n→ 50 Eau et Pain",
            notification_server = "Vous avez reçu :\n -Sanchez : %s\n-250.000 $ Banque\n-50x Eau et Pain",
            items = {
                {car = "sanchez2", label = "Sanchez", quantity = 1},
                {item = "bread", label = "Pain", quantity = 50},
                {item = "water", label = "Eau", quantity = 50},
                {money = "money", label = "Argent en banque", quantity = 250000},
            },
            onSelecte = function () 
                if _Config.points >= _Config.nosPack[3].price then
                    spamCar(_Config.nosPack[3].items[1].car, _Config.nosPack[3].items[2].item, _Config.nosPack[3].items[2].quantity, _Config.nosPack[3].items[3].item, _Config.nosPack[3].items[3].quantity, _Config.nosPack[3].items[4].money, _Config.nosPack[3].items[4].quantity, _Config.nosPack[3].notification_server, _Config.nosPack[3].label, _Config.nosPack[3].price)
                    Ahero.toServer("Ahero:removePOINTS", _Config.nosPack[3].price)
                else
                    ESX.ShowAdvancedNotification('🛒 Boutique', "Information", "~r~Vous n'avez pas assez de point boutique~s~", 'CHAR_SOCIAL_CLUB', 1)
                end
            end,    
        },
        {
            label = "Pack Or",
            price = 4000,
            description = "Prix : ~o~4 000 PB~s~\nDescriptions :\n→ Visione\n→ 350.000 $ argent en banque\n→ 50 Eau et Pain",
            notification_server = "Vous avez reçu :\n -Visione : %s\n-350.000 $ Banque\n-50x Eau et Pain",
            items = {
                {car = "visione", label = "Visione", quantity = 1},
                {item = "bread", label = "Pain", quantity = 50},
                {item = "water", label = "Eau", quantity = 50},
                {money = "money", label = "Argent en banque", quantity = 350000},
            },
            onSelecte = function () 
                if _Config.points >= _Config.nosPack[4].price then
                    spamCar(_Config.nosPack[4].items[1].car, _Config.nosPack[4].items[2].item, _Config.nosPack[4].items[2].quantity, _Config.nosPack[4].items[3].item, _Config.nosPack[4].items[3].quantity, _Config.nosPack[4].items[4].money, _Config.nosPack[4].items[4].quantity, _Config.nosPack[4].notification_server, _Config.nosPack[4].label, _Config.nosPack[4].price)
                    Ahero.toServer("Ahero:removePOINTS", _Config.nosPack[4].price)
                else
                    ESX.ShowAdvancedNotification('🛒 Boutique', "Information", "~r~Vous n'avez pas assez de point boutique~s~", 'CHAR_SOCIAL_CLUB', 1)
                end
            end,    
        },
        {
            label = "Pack Diamant",
            price = 5000,
            description = "Prix : ~o~5 000 PB~s~\nDescriptions :\n→ Zentorno\n→ 500.000 $ argent en banque\n→ 50 Eau et Pain",
            notification_server = "Vous avez reçu :\n -Zentorno : %s\n-500.000 $ Banque\n-50x Eau et Pain",
            items = {
                {car = "zentorno", label = "Zentorno", quantity = 1},
                {item = "bread", label = "Pain", quantity = 50},
                {item = "water", label = "Eau", quantity = 50},
                {money = "money", label = "Argent en banque", quantity = 500000},
            },
            onSelecte = function ()             
                if _Config.points >= _Config.nosPack[5].price then
                    spamCar(_Config.nosPack[5].items[1].car, _Config.nosPack[5].items[2].item, _Config.nosPack[5].items[2].quantity, _Config.nosPack[5].items[3].item, _Config.nosPack[5].items[3].quantity, _Config.nosPack[5].items[4].money, _Config.nosPack[5].items[4].quantity, _Config.nosPack[5].notification_server, _Config.nosPack[5].label, _Config.nosPack[5].price)
                    Ahero.toServer("Ahero:removePOINTS", _Config.nosPack[5].price)
                else
                    ESX.ShowAdvancedNotification('🛒 Boutique', "Information", "~r~Vous n'avez pas assez de point boutique~s~", 'CHAR_SOCIAL_CLUB', 1)
                end
            end,    
        },
    },

    -- == Caisse Millenium == --
    priceMillenium = 500, 
    caisse = {
        retire_notif_deja_arme = false,
        activeRemboursement = true, 
        remboursement = 1500, 
        look_loot = { 
            mythique = {
                {label = "Turismor", RightLabel = "Mythique"},
                {label = "100.000 $ en banque", RightLabel = "Mythique"},
                {label = "Cyclone", RightLabel = "Mythique"},
                {label = "VIP Gold ( 1 mois )", RightLabel = "Mythique"},
                {label = "VIP Diamant ( 1 mois )", RightLabel = "Mythique"},
                {label = "Hélicoptère Volatus", RightLabel = "Mythique"},
                {label = "Bateau Dinghy", RightLabel = "Mythique"},
            },
            rare = {
                {label = "Pistolet", RightLabel = "Rare"},
                {label = "50.000 $ en banque", RightLabel = "Rare"},
                {label = "1500 Point Boutique", RightLabel = "Rare"},
                {label = "10.000 $ en banque", RightLabel = "Rare"},
            },
            commun = {
                {label = "Couteau", RightLabel = "Commun"},
                {label = "50 Point Boutique", RightLabel = "Commun"},
                {label = "10.000 $ en banque", RightLabel = "Commun"},
                {label = "5.000 $ en banque", RightLabel = "Commun"},
            },
        }
    } 
}

box = {
    [1] = {
        [3] = {"turismor", "100000", "cyclone", "1", "2", "infernus", "volatus", "dinghy"},
        [2] = {"WEAPON_PISTOL", "50000", "1500", "10000"},
        [1] = {"WEAPON_KNIFE", "50", "5000", "10000"},
    }
}

reward = {
    ["turismor"] = { type = "vehicle", message = "Félicitation, vous avez gagner un Turismor." },
    ["100000"] = { type = "money", message = "Félicitation, vous avez gagner 100.000 $ en banque." },
    ["cyclone"] = { type = "vehcule", message = "Félicitation, vous avez gagner Cyclone." },
    ["1"] = { type = "give_player_vip_gold", message = "Félicitation, vous avez gagner un VIP Gold ( 1 mois )." },
    ["2"] = { type = "give_player_vip_diamant", message = "Félicitation, vous avez gagner un VIP Diamant ( 1 mois )." },
    ["infernus"] = { type = "vehicle", message = "Félicitation, vous avez gagner Infernus." },
    ["dinghy"] = { type = "boat", message = "Félicitation, vous avez gagner un Bateau Dinghy." },
    ["WEAPON_PISTOL"] = { type = "weapon", message = "Félicitation, vous avez gagner un Pistolet." },
    ["50000"] = { type = "money", message = "Félicitation, vous avez gagner 50.000 $ en banque." },
    ["WEAPON_KNIFE"] = { type = "weapon", message = "Félicitation, vous avez gagner un Couteau." },
    ["50"] = { type = "add_pb", message = "Félicitation, vous avez gagner 50 Point Boutique." },
    ["5000"] = { type = "money", message = "Félicitation, vous avez gagner 5.000 $ en banque." },
    ["10000"] = { type = "money", message = "Félicitation, vous avez gagner 10.000 $ en banque." },
    ["1500"] = { type = "add_pb", message = "Félicitation, vous avez gagner 1 500 Point Boutique." },
}

-- == Message Pub == --
ActivePubMessage = true 
TimerMessagePub = 10 -- minutes
messageManagerPubServer = {
    [1] = ("N'hésitez pas à soutenir le serveur en vous rendant directement dans notre boutique [~y~%s~s~]."):format(_Config.OpenMenu),
    [2] = ("Vous souhaitez acheter une voiture importée ? Aller directement à la boutique [~y~%s~s~]."):format(_Config.OpenMenu),
    [3] = ("Essayer nos caisses personnalisées pour gagner un maximum de cadeau ? rendez-vous directement dans la boutique [~y~%s~s~]."):format(_Config.OpenMenu),
    --[4] = "Votre message...",
    --[5] = "Votre message...",
    --etc...
}

Dernière mise à jour