# Configuration

## Commands

List of helpful commands for your server's fundamental operations using our asset; you may use ExecuteCommand to run them or read them for information.



| copy            | usability        | description                                                   |
| --------------- | ---------------- | ------------------------------------------------------------- |
| turf            | /turf            | You can with this command open the Turf Ui                    |
| addganglevel    | /addganglevel    | You can with this command add gang level (God father only)    |
| removeganglevel | /removeganglevel | You can with this command remove gang level (God father only) |
| toggleturf      | /toggleturf      | You can with this command toggle turf wars (God father only)  |

## 1. main scripts

here you must to change this config to work with your server, like your Core Name and your Target name script, Inventory name script ... and if you want to use 1 color for all UI.

```lua
Config.Core = 'qb-core'
Config.Target = 'qb-target'
Config.Inventory = 'qb-inventory'
Config.Menu = 'qb-menu'
Config.Color = '' -- if you want use 1 color for all UI example : #66666 
```

## 2. Events

In this configuration, there are two different types of events: client and server events.

```lua
Config.GangUpdateEvent = 'QBCore:Client:OnGangUpdate'
Config.JobUpdateEvent = 'QBCore:Client:OnJobUpdate'
Config.LoadEvent = 'QBCore:Client:OnPlayerLoaded'
Config.UnLoadEvent = 'QBCore:Client:OnPlayerUnload'
Config.Notify = 'QBCore:Notify'
```

## 3. time settings

this is How many minutes does it take to consept the spray and How many minutes do you need to scratch the spray, the Defult is 7 minutes.

```lua
Config.ProggressBar =  7 * 60000 -- How many minutes does it take to consept the spray? , (Defult : 7 min)
Config.RemoveProggressBar =  7 * 60000  -- How many minutes do you need to scratch the spray? , (Defult : 7 min)
```

## 4. Webhook

Our webhook for Discord must be added. If you don't know how to receive a webhook, it's simple and we walk you through it in the video below. To ensure you don't miss any steps, pay close attention:

{% embed url="https://www.youtube.com/watch?v=fKksxz2Gdnc" %}

```lua
Config.Webhok = '' -- Logs Webhok
```

## 5. Blips

In this short tutorial you will learn how to edit the settings of the blips, you can change the opacity of the blip (0-100) and Blips Cricle Raduis in FiveM Mini Map.

```lua
Config.BlipOpacity = 85 -- the opacity of the blip (0-100) 
Config.BlipRaduis = 80.0  --Blips Cricle Raduis in FiveM Mini Map
```

## 6. Ped settings

In this short tutorial you will learn how to edit the ped and the ped coords, you need this website

{% embed url="https://docs.fivem.net/docs/game-references/ped-models/" %}

```lua
Config.Ped = 'g_m_importexport_01' -- Spray seller Ped
Config.PedCoords = vec4(-509.32272338867, -2222.1071777344, 6.3940186500549, 239.59478759766) -- Spray seller location
```

## 7. Items

this is the two items you need it to Spraying and Removing Spraying.

```lua
Config.SprayItem = 'turfspray' -- Sprayer Item
Config.RemoveSprayItem = 'spray_remover' -- Remoing Spraying Item
```

## 8. Spray settings

this is the number of How many player gang must be online to consept the spray and How many must be online from another gang to scratch theier spray.

```lua
Config.ContestCount  = 3 --   (Defult : 3 )
Config.RemoveCount = 4 --  (Defult : 4 )
```

this is the number of How much gang can consept spray in 1 Restart and How much Palyer can pay gang spray in 1 Restart.

```lua
Config.LimtSpray = 2 --  (Defult : 2 )
Config.LimtSprayPay = 2 --  (Defult : 2 )
```

Here you can change Sprayer and Remove Sprayer Price.

```lua
Config.SprayPrice = 5000 -- Sprayer Price , (Defult : 5000)
Config.SprayRemoverPrice = 3000  -- Remove Sprayer Price , (Defult : 3000)
```

## 9. War Nnotification

Here is the Notification settings for the gang whose area is under scratching, you can change everything for example : time, color ...

```lua
Config.WarNotify = { 
    ['sprite'] = 161,  
    ['color'] = 1,
    ['scale'] = 2.7,
    ['time'] = 7 * 60000,
    ['sound'] = true,
    ['msg'] = true,
}
```

## 10. Police Options

this is a new Options If you want to allow to officers to clean the gangs Grafifiti, you have advenseds options.

```lua
Config.PoliceCanClean  = true -- If you want to allow to officers to clean the gangs Grafifiti
Config.PoliceCleanProggressBar =  3 * 60000  -- How many minutes do you need to clean the spray (for officer)? , (Defult : 3 min)
Config.ShowForAll = true -- true : show for all players  || true : show only for gangs members and police jobs 
Config.PoliceJobs = { -- you can add any job (this working only if Config.ShowForAll = false )
    ['police'] = true,
    ['sheriff'] = false,
}
```

## 11. Gangs Sprays

l2s-gangturf has a advanced system you can change the gangs and the logo, color, sprayname of each gang.

```lua
Config.GangsSprays = { -- All Your Available Gangs
    ['ballas'] = {
        circlecolor = 27, -- blips color in map
        sprayname = 'spray_ballas',  -- spray object name
        rgbcolor = {r = 151, g = 4, b = 215}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130204019231559791/image.png',-- Gang Logo In Ui
    },
    ['vagos'] = {
        circlecolor = 5, -- blips color in map
        sprayname = 'spray_vagos', -- spray object name
        rgbcolor = {r = 223, g = 216, b = 6}, -- spray effect color
        logo = 'https://media.discordapp.net/attachments/1028349910845755493/1130176542127955980/Vagos.png?width=409&height=409',-- Gang Logo In Ui
    },
    ['lostmc'] = {
        circlecolor = 72, -- blips color in map
        sprayname = 'spray_lostmc', -- spray object name
        rgbcolor = {r = 0, g = 0, b = 0}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130202899696341123/Lost_mc_logo_by_comrade_max.webp',-- Gang Logo In Ui
    },
    ['crips'] = {
        circlecolor = 26, -- blips color in map
        sprayname = 'spray_crips', -- spray object name
        rgbcolor = {r = 10, g = 149, b = 229}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130203386004914247/7cb82cea9c97958912f9b3cf8ee2fa2a22e8ba7d_00.jpg',-- Gang Logo In Ui
    },
    ['bloods'] = {
        circlecolor = 49, -- blips color in map
        sprayname = 'spray_bloods', -- spray object name
        rgbcolor = {r = 229, g = 32, b = 10}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130203747130286181/Bloods.webp',-- Gang Logo In Ui
    },
    ['families'] = {
        circlecolor = 52, -- blips color in map
        sprayname = 'spray_familes', -- spray object name
        rgbcolor = {r = 36, g = 196, b = 4}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130202036269498438/Families.webp',-- Gang Logo In Ui
    },
    ['altruists'] = {
        circlecolor = 10, -- blips color in map
        sprayname = 'spray_altruists', -- spray object name
        rgbcolor = {r = 102, g = 0, b = 0}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130206144925814905/image.png',-- Gang Logo In Ui
    },
    ['triads'] = {
        circlecolor = 76, -- blips color in map
        sprayname = 'spray_triads', -- spray object name
        rgbcolor = {r = 196, g = 43, b = 4}, -- spray effect color
        logo = 'https://cdn.discordapp.com/attachments/1028307243948572714/1130204586519580732/VhymqRL.png', -- Gang Logo In Ui
    },
}
```

## 12. Language

in l2s-gangsturf you can change the Language to any Language do you want.

```lua
Config.Lang = { -- Language
    [1] = 'You cant do this inside vehicle',
    [2] = 'Spraying...',
    [3] = 'You are in another gang area, you must remove the current sprayer first',
    [4] = 'Cleaning the sprayer',
    [5] = 'There is not enough gang to remove the spray',
    [6] = 'There is no spray near you',
    [7] = 'Someone is scratching your grafifiti, Open GPS to go',
    [8] = 'There are not enough of your gang to spray',
    [9] = 'Buy Things',
    [10] = 'You cant spray more that: '..Config.LimtSpray..' in same restart',
    [11] = 'You Are not enable to use that ',
    [12] = 'You Are not in any gang',
    [13] = 'Sprayer Has been removed',
    [14] = 'You dont have money',
    [15] = 'You Paid a ',
    [16] = 'You cant pay more than : '..Config.LimtSprayPay..' Now',
    [17] = 'You dont have spray remover',
    [18] = 'Turf Ward Disabled By God Father',
    ---- UI
    [19] = 'Gangs Turf',
    [20] = 'Gangs Members',
    [21] = 'Online',
    [22] = 'Offline',
    [23] = 'Gang Name',
    [24] = 'Gang Level',
    [25] = 'Gangs Members',
    [26] = 'Other Gangs',
    [27] = 'Top Gangs Levels',
    [28] = 'My Gang', -- page 1 (my gang)
    [29] = 'Top Levels', -- page 2 (top levels)
    ----------- Other
    [30] = 'Way Point Set In GPS',
    [31] = "There is Already Sprayer near you!",
    [32] = "Canceled!",
    [33] = "There is no sprayer here!",
    -- Menu / Shop
    [34] = 'Turf Gangs (Sprays)',
    [35] = 'Gang Spray',
    -- Target :
    [36] = 'Scratch',
    [37] = 'Discover',
    -- Commands :
    [38] = "Add Gang Level (GodFather Only)",
    [39] = "Remove Gang Level (GodFather Only)",
    [40] = "On/Off Turf Wars (GodFather Only)",
    [41] = "Open Turf Dash (Gangs Only)",
    [42] = 'worng gang name',
    [43] = 'worng amount',
    [44] = 'This Command Only for god father',
    [45] = 'This Command Only for gangs',
    [46] = 'Turf Wars Tunred On',
    [47] = 'Turf Wars Tunred Off',
    [48] = 'Spray Remover',
    [49] = 'Clean Grafifiti',
}
```
