# Configuration

## Configuring Gang-Management

1. Go to the configuration file (`spoodyGangs/configuration/config.lua`)
2. Inside of the file, find the `Config.Gangs`
3. Use the dummy-code below to learn how to create a configuration for your gangs!

```lua
["Crips"] = { -- The name of the gang (gang code, not label!)
    Management = vec3(317.0, -2043.4, 20.0), -- The location of management coordinates
    VehicleSpawn = vec3(326.594849, -2033.116211, 20.936781), -- The location of where the vehicle spawns (from the gang management)
},
```

## Important Notices

1. Only those with the leadership rank and above in the SQL can handle gang management.
2. You cannot Promote/Demote or Kick anyone above your rank in the gang management
3. Customizing Gang-Vehicles will not save (This will come in a sooner update)

## Configuring Gang Turfs

1. Go to the configuration file (`spoodyGangs/configuration/config.lua`)
2. Inside of the file, find the `Config.Zones`
3. &#x20;Use the dummy-code below to learn how to create a turf war for gangs!

```lua

["Legion Square"] = { -- The name of the Turf
    Location = vector3(197.31, -935.67, 30.68), -- Location where the turf gets initiate, and where the marker will draw
    Alternate = vec3(157.878174, -915.389160, 30.149706), -- Location which people will teleport to in certain scenarios (Death, Not in Gang etc)
    Label = "Legion Square", -- Label of the turf for the chat-messages and others
    Distance = 36.0, -- The Size of the Zone
    Image = "https://cdn.discordapp.com/attachments/959222852865892442/1002313785639440476/legionsquare.png", -- The image which where the discord log (if enabled) will send information when the turf ends including the picture
    Rewards = {
        ["Dirty Money"] = 325000, -- The amount of dirty-money they will recieve (can only be dirty money)
    },
},
```

## Important Notices

1. Players who enter the turf without a gang, will be teleported out of the turf at the configured "alternate" location.
2. Players who enter the turf in a vehicle without a gang, will be teleported out of the turf inside of their vehicle, at the configured "alternate" location.
3. Players who enter the turf in a vehicle whilst in a gang will get their car instantly deleted and able to enter the turf
4. Players who die inside of the turf will be teleported out of the turf and un-registered from it.
5. Players who are in the turf and get removed from their gang, will be instantly removed from the turf.
6. Players who enter the turf in a gang that has more than the configured strikes will be teleported out of the turf.
7. Players who attempt to start a turf in a gang that has more than the configured strikes will not be able to start it.

## Configuring Configuration Settings

1. Go to the configuration file (`spoodyGangs/configuration/config.lua`)
2. Inside of the file, find the `Config.Settings`
3. &#x20;Use the help code below to learn how to configure the settings!

```lua
CaptureTimer = 20, -- The time it takes for a turf to complete
UnarmOnEnd = true, -- Unarm all players inside the turf when it ends? (prevents accidental RDM)
CaptureCooldown = 50, -- Seconds (The time it takes until a turf can be captured again after it ends)

Strikes = { -- Strike system
    Enabled = true, -- Enable the strike system?
    Max = 10, -- The amount of strikes until penalties begin to set
},

MaxTurfs = { -- Max Turf Capture System
    Enabled = true, -- Enable max capture system?
    Max = 2 -- The amount of turfs a gang can capture at a time 
},

TurfMarker = { -- Required
    MarkerType = 28, -- The marker type (Circle)
    MarkerColor = { 
        Red = 102, -- Red color of the turf
        Green = 0, -- Green color of the turf
        Blue = 0, -- Blue color of the turf
        Alpha = 180 -- The alpha of the turf
    }
}

```

## Configuring Admin/Player Commands

1. Go to the configuration file (`spoodyGangs/configuration/config.lua`)&#x20;
2. Inside the file, Find `Config.Commands`&#x20;
3. Use the help code below to learn how to configure your commands & its permissions!lua

```lua
Config.Commands = {
    SetGang = { -- /setgang command
        Enabled = true, -- Enable the /setgang command for admins?
        Command = "setgang", -- Command name
        Permission = "osrp.admin", -- Permission Ace for administrators
    },
    RemoveGang = { -- /removegang command
        Enabled = true, -- Enable the /removegang command for admins?
        Command = "removegang", -- Command name
        Permission = "osrp.admin" -- Permission Ace for administrators
    },
    StrikeGang = { -- /addstrike command
        Enabled = true, -- Enable the /addstrike command for admins?
        Command = "addstrike", -- Command name
        Permission = "osrp.admin", -- Permission Ace for administrators
    },
    RemoveStrike = { -- /removestrike command
        Enabled = true, -- Enable the /removestrike command for admins?
        Command = "removestrike", -- Command name
        Permission = "osrp.admin", -- Permission Ace for administrators
    },
    CheckStrikes = { -- /checkstrikes command
        Enabled = true, -- Enable the /removestrike command for admins?
        Command = "checkstrikes", -- Command name
        Permission = "osrp.admin" -- Permission Ace for administrators
    },
    LeaveGang = { -- /leavegang command
        Enabled = true, -- Enable the /leavegang command for players?
        Command = "leavegang" -- Command name
    }
}
```
