# Installation

<mark style="color:blue;">Remember that this resource has verified DMCA protection, and its illegal use or distribution could imply a claim for protection of Title 17 of Chapter 512 (c) (3) of the Digital Millennium Copyright Act</mark>

## General

As the first step copy the folder to your resource folder, check the resource structure as in the following photo.

<figure><img src="/files/M288e4PQHU9eLE3MRQ5w" alt=""><figcaption><p>Normal structure of LeofComp</p></figcaption></figure>

## No SQL

For a nosql install, make sure you have the non-sql version of the script, to check this go into the gconfig folder and locate the whitelisted.lua file. If you have this file it means that you have the nosql version.

<figure><img src="/files/Buuw6wt4UEcb0zL37Ndk" alt=""><figcaption><p>gconfig folder</p></figcaption></figure>

### SQL

For sql install you need to open "lcompwhitelist.sql" and execute the code , this will create a table inside your database.

```sql
CREATE TABLE `lcompwhitelist` (
  `identifier` varchar(60) NOT NULL PRIMARY KEY
)
```

### Step 1 : Configuration

Open the mainconfig.lua file.

* ```lua
  Config = {}

  -- ___________                                                __    
  -- \_   _____/___________    _____   ______  _  _____________|  | __
  --  |    __) \_  __ \__  \  /     \_/ __ \ \/ \/ /  _ \_  __ \  |/ /
  --  |     \   |  | \// __ \|  Y Y  \  ___/\     (  <_> )  | \/    < 
  --  \___  /   |__|  (____  /__|_|  /\___  >\/\_/ \____/|__|  |__|_ \
  --      \/               \/      \/     \/                        \/

  Config.framework = 'ESX' --- @param Set 'ESX' or 'QBCore'
  Config.customFramework = false ---@param for custom exports

  --- @param If you are using ESX 1.8.5 or higher put in true 'Config.customFramework' and uncomment line 15
  function CustomFrameworkObject()
     ESX = exports["es_extended"]:getSharedObject()
  end

  ---@param Function for remove money in case you have custom framework (you should use the same variable of 'CustomFrameworkObject')
  function CustomRemoveMoney()
     
  end

  -- ___________                   __  .__                     .__  .__  __          
  -- \_   _____/_ __  ____   _____/  |_|__| ____   ____ _____  |  | |__|/  |_ ___.__.
  --  |    __)|  |  \/    \_/ ___\   __\  |/  _ \ /    \\__  \ |  | |  \   __<   |  |
  --  |     \ |  |  /   |  \  \___|  | |  (  <_> )   |  \/ __ \|  |_|  ||  |  \___  |
  --  \___  / |____/|___|  /\___  >__| |__|\____/|___|  (____  /____/__||__|  / ____|
  --      \/             \/     \/                    \/     \/               \/     

  Config.Priced = true
  Config.vip = false  --TRUE: WHITELISTED WHITELISTED.JSON | FALSE : NO WHITELISTED
  Config.sql = false ---@param if true for the moment only compatible with oxymysql

  -- _____  .__               
  -- /     \ |__| ______ ____  
  -- /  \ /  \|  |/  ___// ___\ 
  -- /    Y    \  |\___ \\  \___ 
  -- \____|__  /__/____  >\___  >
  --       \/        \/     \/ 

  Config.message = "PRESS [ ~g~E~w~ ] FOR COMPONENTS"

  Config.Coords = {
      X = 19.19,
      Y = -1108.86,
      Z = 29.8
   }

   Config.CamCoords = {
      X = 20.15,
      Y = -1106.51,
      Z = 30.2
   }

   Config.CamPointCoords ={
      X= 20.58,
      Y = -1105.49,
      Z = 30.2
   }

   Config.CreateWeapon = {
     X= 20.58,
     Y = -1105.49,
     Z = 30.2
   }

   Config.R = 209
   Config.G = 255
   Config.B = 255
  ```
* *<mark style="color:blue;">Config.framework :</mark>* This is for will display the message above the marker.
* *<mark style="color:blue;">Config.customFramework</mark>* <mark style="color:blue;"></mark><mark style="color:blue;">:</mark> Set true if you are using custom framework (you should edit the functions <mark style="color:yellow;">CustomFrameworkObject()</mark> and <mark style="color:yellow;">CustomRemoveMoney()</mark>
* *<mark style="color:yellow;">function CustomFrameworkObject() :</mark>* Function to get object of your custom framework.
* *<mark style="color:yellow;">function CustomRemoveMoney() :</mark>* Function to remove money of player (you should use your custom framework object here too.
* <mark style="color:blue;">Config.Priced :</mark> This is for set price system.
* *<mark style="color:blue;">Config.vip :</mark>* True for enable VIP system, you should add the hex steam identifier in the file **whitelisted.lua.**

  ```lua
  whitelistedplayers = {
      "steam:11000010d2baef"
  }
  ```
* <mark style="color:blue;">Config.sql</mark>*<mark style="color:blue;">:</mark>* This is for change the vip to sql database, you should made the sql install first.
* *<mark style="color:blue;">Config.message :</mark>* This is for will display the message above the marker.
* *<mark style="color:blue;">Config.Coords:</mark>* This configuration is for set the marker position in X,Y,Z.
* *<mark style="color:blue;">Config.CamCoords :</mark>* This configuration is for set camera position.
* *<mark style="color:blue;">Config.CamPointCoords:</mark>* This configuration is for set the camera pointer.
* *<mark style="color:blue;">Config.CreateWeapon :</mark>* This configuration is for set the position where the weapon will be created.
* *<mark style="color:blue;">Config.R/G/B :</mark>* This configuration is for set the colors of the marker.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://leoshop.gitbook.io/leoshop/leofcomp/steps/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
