> For the complete documentation index, see [llms.txt](https://fox-store-1.gitbook.io/oz-store/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fox-store-1.gitbook.io/oz-store/oz_speedcamera/installation.md).

# INSTALLATION

1. Add "oz\_speedcamera" to the resource folder.
2. Slightly modify the Config.lua file in the case for the webhook URL link.
3. Restart the server.

```
Config = {}

Config.ESXVersion = 'legacy'                      --- 'legacy' für neue ESX-Versionen (1.8+), 'classic' für alte (1.2, 1.1, etc.)
Config.Debug = false                              --- Debug-Modus (zeigt Konsole-Prints)
Config.EnablePoliceAlert = true                   --- Polizei benachrichtigen, wenn geblitzt wird
Config.ShowRadarBlips = false
Config.DirectFine = true                          --- true: Geld direkt von Bank abziehen; false: Rechnung senden
Config.UseMPH = false                             --- true: Geschwindigkeit in MPH; false: in KMH

--- FlashEffect
Config.FlashEffect = true
Config.FlashMode = "animpostfx" -- "screen", "animpostfx", or "light"

--- Discord Webhook
Config.BlitzerWebhook = "DEIN_DISCORD_WEBHOOK_HIER"  --- Discord Logging aktivieren (leerlassen = deaktiviert)

--- Sound Einstellung
Config.SoundSystem = 'sound'               -- Sound-System: 'sound' oder 'default'
Config.SoundURL = './sounds/speedcamera.ogg'                        -- Bei sound: URL oder Pfad zur MP3-Datei
Config.SoundVolume = 0.3                    -- Lautstärke

-- Kamera Prop
Config.PlaceRadarProps = false
Config.RadarProp = "prop_cctv_pole_01a"

--- Blitzerpositionen (Beispiel)
Config.Radars = {
    -- Innenstadt / Los Santos (90 km/h)
    { coords = vector3(235.0, -1000.0, 29.0), speedLimit = 90, heading = 270.0 },   -- LSPD / Mission Row
    { coords = vector3(-500.0, -200.0, 35.0), speedLimit = 90, heading = 270.0 },   -- Rockford Hills (Hauptstraße)
    { coords = vector3(300.0, -800.0, 29.0), speedLimit = 90, heading = 270.0 },    -- Alta
    { coords = vector3(-1020.0, -270.0, 37.0), speedLimit = 90, heading = 270.0 },  -- Del Perro Blvd (Kreuzung)
    { coords = vector3(-1185.0, -100.0, 40.0), speedLimit = 90, heading = 270.0 },  -- Vinewood Boulevard

    -- Del Perro Freeway (120 km/h)
    { coords = vector3(-1000.0, -1450.0, 5.0), speedLimit = 120, heading = 270.0 }, -- Unterhalb Olympic Freeway
    { coords = vector3(-1200.0, -700.0, 20.0), speedLimit = 120, heading = 270.0 }, -- Del Perro westlich

    -- Great Ocean Highway (120 km/h)
    { coords = vector3(-3100.0, 1150.0, 20.0), speedLimit = 120, heading = 270.0 }, -- Nord-West-Küste
    { coords = vector3(-2150.0, 650.0, 115.0), speedLimit = 120, heading = 270.0 }, -- Chiliad-Höhe
    { coords = vector3(-1600.0, -300.0, 50.0), speedLimit = 120, heading = 270.0 }, -- Nähe Zancudo-Tunnel

    -- Senora Freeway (East Highway – 120 km/h)
    { coords = vector3(1820.0, 900.0, 120.0), speedLimit = 120, heading = 270.0 },  -- Südlich Sandy
    { coords = vector3(2400.0, 1500.0, 100.0), speedLimit = 120, heading = 270.0 }, -- Östlich Sandy
    { coords = vector3(2900.0, 4400.0, 50.0), speedLimit = 120, heading = 270.0 },  -- Paleto Tunnel (Norden)

    -- Autobahnkreuz / Rampen
    { coords = vector3(1200.0, -2800.0, 30.0), speedLimit = 120, heading = 270.0 }, -- Airport-Autobahn
    { coords = vector3(2300.0, -400.0, 95.0), speedLimit = 120, heading = 270.0 },  -- Senora ↔ Ocean Hwy
    { coords = vector3(1678.9441, 1346.1953, 87.2292), speedLimit = 120, heading = 270.0 }, 

    -- Blaine County (100 km/h)
    { coords = vector3(1500.0, 6400.0, 22.0), speedLimit = 100, heading = 270.0 },  -- Paleto Blvd (Feuerwache)
    { coords = vector3(450.0, 6000.0, 30.0), speedLimit = 100, heading = 270.0 },   -- Grapeseed Einfahrt
    { coords = vector3(1680.0, 3600.0, 35.0), speedLimit = 100, heading = 270.0 },  -- Alamo Rundstraße

    -- Tunnel / Stadtübergänge
    { coords = vector3(-75.0, -2100.0, 16.0), speedLimit = 100, heading = 270.0 },  -- Elgin Tunnel
    { coords = vector3(385.0, -1100.0, 30.0), speedLimit = 90, heading = 270.0 },   -- Pillbox Brücke

    -- Bonus: Überraschungseffekt
    { coords = vector3(200.0, -1800.0, 27.0), speedLimit = 90, heading = 270.0 },   -- Davis (Südzone)
    { coords = vector3(-1400.0, -590.0, 30.0), speedLimit = 90, heading = 270.0 },  -- Vespucci Kreuzung

}

-- Toleranz in der gewählten Einheit (km/h oder mph, je nach Config.UseMPH) (alles darunter = keine Strafe)
Config.SpeedTolerance = 0

-- Bußgeld-Staffelung
Config.SpeedFines = {
    { min = 4,  max = 9,  price = 20  },
    { min = 10, max = 19, price = 75  },
    { min = 20, max = 29, price = 150 },
    { min = 30, max = 49, price = 300 },
    { min = 50, max = 999, price = 600 }
}

-- Welche Jobs sollen Polizei-Meldungen erhalten?
Config.AlertJobs = {
    'police',
    'sheriff'
}

-- Jobs, die niemals geblitzt werden sollen
Config.IgnoredJobs = {
    'police',
    'sheriff'
}

-- Benachrichtigungs-System ('esx', 'okok', 'oznotify', 'ox', 'esx_advanced')
Config.NotificationSystem = 'esx_advanced'

-- Dynamische Notify-Funktion (unverändert lassen)
Config.Notify = function(msg, type)
    type = type or "info" -- "info", "error", "success"

    if Config.NotificationSystem == 'esx' then
        SetNotificationTextEntry("STRING")
        AddTextComponentSubstringPlayerName(msg)
        DrawNotification(false, true)

    elseif Config.NotificationSystem == 'okok' then
        TriggerEvent('okokNotify:Alert', "Blitzer", msg, 5000, type)

     elseif Config.NotificationSystem == 'esx_advanced' then
        -- Icon, Titel, Absender & Nachricht
        local title = "Geschwindigkeitskontrolle"
        local sender = "Stadt Los Santos"
        local icon = "CHAR_CALL911"
        ESX.ShowAdvancedNotification(title, sender, msg, icon, 1)
    
    elseif Config.NotificationSystem == 'oznotify' then
        TriggerEvent('oz_notify:sendNotify', msg, "success", 5000)

    elseif Config.NotificationSystem == 'ox' then
        lib.notify({
            title = 'Blitzer',
            description = msg,
            type = type, -- inform | success | error
            duration = 5000
        })

    else
        print('[WARNUNG] Ungültiges Notification-System in Config!')
    end
end

-- Auswahl des Police Notification-Systems: 'oznotify', 'esx_advanced'
Config.NotificationPoliceSystem = 'esx_advanced'

-- Notify Alert Police
Config.PoliceNotify = function(msg, type)
    type = type or "info" -- "info", "error", "success"

    if Config.NotificationSystem == 'esx_advanced' then
        -- Icon, Titel, Absender & Nachricht
        local title = "Radar"
        local sender = "Blitzer Ausgelöst"
        local icon = "CHAR_CALL911"
        ESX.ShowAdvancedNotification(title, sender, msg, icon, 1)
    
    elseif Config.NotificationSystem == 'oznotify' then
        TriggerEvent('oz_notify:sendNotify', msg, "success", 5000)

    else
        print('[WARNUNG] Ungültiges Notification-System in Config!')
    end
end
```
