# Configuration

`config.lua`

```lua
Config = {}

Config.locale = 'de'

-- Custom Notify -- type is 'success' or 'error'
Config.notify = function(src, type, title, message)
    print("Notify: " .. type .. " " .. title .. " " .. message)
    if src == 0 then
        print(title .. ': ' .. message)
    elseif src ~= nil then
        if GetResourceState("ov_hud") == "started" then
            if type == "error" then
                TriggerClientEvent('ovara_hud:notify', src, "0", title, message)
            else
                TriggerClientEvent('ovara_hud:notify', src, "1", title, message)
            end
        else
            local xPlayer = ESX.GetPlayerFromId(src)
            xPlayer.showNotification(message)
        end
    else
        if GetResourceState("ov_hud") == "started" then
            if type == "error" then
                TriggerEvent('ovara_hud:notify', "0", title, message)
            else
                TriggerEvent('ovara_hud:notify', "1", title, message)
            end
        else
            ESX.ShowNotification(message)
        end
    end
end

Config.RestrictedWeapons = {
}

Config.RestrictedItems = {
    ["vestpolice"] = { "police" }
}

Config.VestTime = 5000

Config.WeaponAnims = true
Config.NoNPC = true
Config.InfiniteStamina = true
Config.BodyShot = false

Config.CarClearTime = 15
Config.CarClearDistance = 100
Config.CarClearNotificationOn = { 5, 3, 1 }
Config.CarClearNotification = "Alle Fahrzeuge die %s Meter von Spielern entfernt sind, werden in %s Minuten gelöscht"
Config.CarClearClearedNotification = "Die Fahrzeug wurden gecleart"

function Config.ProgressBar(time, text)
    TriggerEvent("nightlife_hud:progressBar", time, text)
end

function Config.CarClearAnnounce(message)
    print("CarClearAnnounce", message)
    TriggerEvent("txAdmin:events:announcement", {
        author = "System",
        message = message
    })
end

Config.CombatLogRange = 10
Config.CombatLogMessage = "Anti Combatlog - %s is disconnectet (Grund: %s)"

Config.MaxKMH = 100

Config.Aduty = {}

Config.Aduty.groups = { "projektleitung", "stvprojektleitung", "manager", "frakleitung", "teamleitung", "givecar",
    "supporter", "moderator", "admin" }
Config.Aduty.groupOutfits = {
    ["projektleitung"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 395,
            ['torso_2'] = 3,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 144,
            ['pants_2'] = 3,
            ['shoes_1'] = 102,
            ['shoes_2'] = 3,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 198,
            ['mask_2'] = 3,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["stvprojektleitung"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 507,
            ['torso_2'] = 3,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 246,
            ['pants_2'] = 3,
            ['shoes_1'] = 197,
            ['shoes_2'] = 3,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 238,
            ['mask_2'] = 3,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["manager"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 507,
            ['torso_2'] = 2,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 246,
            ['pants_2'] = 2,
            ['shoes_1'] = 197,
            ['shoes_2'] = 2,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 238,
            ['mask_2'] = 2,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["supporter"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 506,
            ['torso_2'] = 0,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 245,
            ['pants_2'] = 0,
            ['shoes_1'] = 196,
            ['shoes_2'] = 0,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 237,
            ['mask_2'] = 0,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["admin"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 507,
            ['torso_2'] = 0,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 246,
            ['pants_2'] = 0,
            ['shoes_1'] = 197,
            ['shoes_2'] = 0,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 238,
            ['mask_2'] = 0,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["moderator"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 506,
            ['torso_2'] = 1,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 245,
            ['pants_2'] = 1,
            ['shoes_1'] = 196,
            ['shoes_2'] = 1,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 237,
            ['mask_2'] = 1,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["frakleitung"] = {
        male = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 506,
            ['torso_2'] = 2,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 245,
            ['pants_2'] = 2,
            ['shoes_1'] = 196,
            ['shoes_2'] = 2,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 237,
            ['mask_2'] = 2,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["autovergabe"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 507,
            ['torso_2'] = 2,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 246,
            ['pants_2'] = 2,
            ['shoes_1'] = 197,
            ['shoes_2'] = 2,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 238,
            ['mask_2'] = 2,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },
    },
    ["teamleitung"] = {
        male = {
            ['tshirt_1'] = 15,
            ['tshirt_2'] = 0,
            ['torso_1'] = 507,
            ['torso_2'] = 1,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 7,
            ['pants_1'] = 246,
            ['pants_2'] = 1,
            ['shoes_1'] = 197,
            ['shoes_2'] = 1,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 238,
            ['mask_2'] = 1,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        },

        female = {
            ['tshirt_1'] = 14,
            ['tshirt_2'] = 0,
            ['torso_1'] = 529,
            ['torso_2'] = 7,
            ['decals_1'] = 0,
            ['decals_2'] = 0,
            ['arms'] = 8,
            ['pants_1'] = 181,
            ['pants_2'] = 7,
            ['shoes_1'] = 162,
            ['shoes_2'] = 7,
            ['helmet_1'] = -1,
            ['helmet_2'] = 0,
            ['mask_1'] = 204,
            ['mask_2'] = 7,
            ['chain_1'] = 0,
            ['chain_2'] = 0,
            ['ears_1'] = 0,
            ['ears_2'] = 0,
            ['bags_1'] = 0,
            ['bags_2'] = 0,
            ['hair_1'] = 0,
            ['hair_2'] = 0,
            ['bproof_1'] = 0,
            ['bproof_2'] = 0
        }
    }
}

Permissions = {}

Permissions.groups = { "projektleitung", "stvprojektleitung", "manager", "supporter", "moderator", "administrator",
    "frakleitung", "autovergabe", "teamleitung" }

-- for extra perm use command.COMMANDNAME
Permissions["projektleitung"] = {
    "command", -- all perms
    "jobcreator",
    "doors_creator",
    "drugscreator",
    "vehicleskeys",
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
}

Permissions["stvprojektleitung"] = {
    "command.aduty",
    "command.setjob",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.dv",
    "command.revive",
    "command.skin",
    "command.setped",
    "command.tpm",
    "jobcreator",
    "doors_creator",
    "command.giveweapon",
    "command.giveitem"
}

Permissions["manager"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
    "command.dv",
    "command.setped",
    "command.giveweapon",
    "command.giveitem"
}

Permissions["supporter"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
}

Permissions["moderator"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
}

Permissions["administrator"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
}

Permissions["frakleitung"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
    "command.dv",
    "command.setped",
    "command.setjob",
}

Permissions["autovergabe"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
    "command.dv",
    "command.setped",
}

Permissions["teamleitung"] = {
    "command.aduty",
    "command.noclip",
    "command.goto",
    "command.bring",
    "command.revive",
    "command.skin",
    "command.dv",
    "command.setped",
}
```

`discordConfig.lua`

```lua
DCConfig = {}

DCConfig.Logs = {
    name = "Pizza",
    color = "16711686",
    title = "logs",
    iconURL = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS6iEgVNfoTWeOn9CvaErWY2vF__dxuQ_YpCQdA7Z7M&s",
    url =
    "YOUR_DISCORD_WEBHOOK"
}

DCConfig.SendMessage = function(webhookURL, message, source, source2)
    if (not webhookURL) then
        return
    end
    local xPlayer = ESX.GetPlayerFromId(source)
    local xTarget = ESX.GetPlayerFromId(source2)
    CreateThread(function()
        local embed = {
            ["title"] = DCConfig.Logs.title,
            ["description"] = "**Name**: " ..
                xPlayer.getName() .. " | " .. GetPlayerName(source) ..
                "\n**ID**: " ..
                xPlayer.source ..
                "\n**Identifier**: " ..
                xPlayer.getIdentifier() ..
                "\n**Discord**: <@" ..
                tostring(GetPlayerIdentifierByType(xPlayer.source, 'discord'):gsub("discord:", "")) ..
                ">" ..
                "\n**Steam**: " ..
                tostring(GetPlayerIdentifierByType(xPlayer.source, 'steam')) .. "\n\n" .. "**Name**: " ..
                xTarget.getName() .. " | " .. GetPlayerName(source) ..
                "\n**ID**: " ..
                xTarget.source ..
                "\n**Identifier**: " ..
                xTarget.getIdentifier() ..
                "\n**Discord**: <@" ..
                tostring(GetPlayerIdentifierByType(xTarget.source, 'discord'):gsub("discord:", "")) ..
                ">" ..
                "\n**Steam**: " ..
                tostring(GetPlayerIdentifierByType(xTarget.source, 'steam')) .. "\n\n" .. message,
            ["color"] = DCConfig.Logs.color,
            ["author"] = {
                ["name"] = DCConfig.Logs.name,
                ["icon_url"] = DCConfig.Logs.iconURL
            }
        }
        local jsonData = json.encode({ avatar_url = DCConfig.Logs.iconURL, embeds = { embed } })
        PerformHttpRequest(webhookURL, function(err, text, headers)
        end, 'POST', jsonData, { ['Content-Type'] = 'application/json' })
    end)
end
```

{% hint style="info" %}
If you find any errors in the config that you can't fix yourself, open a ticket on our [<mark style="color:red;">Discord</mark>](https://discord.ovara.gg/)!
{% endhint %}
