Redutzu's Scripts
  • â„šī¸Information
  • 🛒Store
  • đŸ’ģDiscord
  • 📚Resources
    • Redutzu MDT
      • Installation
      • Guides
        • Frameworks
        • Items
        • Localization
        • Images
        • Logs
        • Permissions
        • Bodycam
      • Exports/Events
        • Server Events
          • addDispatchToMDT
        • Server Exports
          • Incidents
          • Evidences
          • Warrants
          • Bolos
          • Citizens
          • Vehicles
          • Codes
          • Charges
          • Weapons
          • Announcements
          • Tags
        • Client Events
          • Open/Close MDT
        • Client Exports
      • Common Issues
    • Redutzu EMS
      • Installation
      • Guides
      • Exports
    • Redutzu Documents
      • Installation
      • Guides
      • Exports
Powered by GitBook
On this page
  • 1. Client Config (client/config.lua)
  • 2. Shared Config (config.lua)
  • 3. Server Config (server/config.lua)

Was this helpful?

  1. Resources
  2. Redutzu Documents

Guides

Here you will find all the options from the configuration explained with some examples.

The script is divided into 3 config files to have the highest data security!

1. Client Config (client/config.lua)

Config.Notify = function(message, type)
    exports['esx_notify']:Notify(type, 5000, message)
end

2. Shared Config (config.lua)

Config.Messages = {
    ['NOT_ALLOWED'] = 'You are not allowed to do that!',
    ['CANT_NOW'] = 'You can\'t do that now!'
}

Config.Jobs = {
    ['police'] = {
        colors = {
            background = '#1243e3',
            header = '#648df3'
        },
        command = {
            enabled = true,
            name = '+police_document',
            description = 'Display your document to nearby players'
        },
        item = {
            enabled = true,
            name = 'police-card'
        },
        prop = {
            name = 'prop_fib_badge'
        },
        animation = {
            dict = 'paper_1_rcm_alt1-9',
            anim = 'player_one_dual-9',
            bone_index = 28422
        },
        information = {
            { label = 'Job', value = 'job.label' },
            { label = 'Grade', value = 'job.grade_label' },
            { label = 'Date of birth', value = 'variables.dateofbirth' }
        },
        removeBackground = false,
        range = 5.0,
        time = 4.0
    },
    ['ambulance'] = {
        colors = {
            background = '#fc4457',
            header = '#fa6e7c'
        },
        command = {
            enabled = true,
            name = '+ambulance_document',
            description = 'Display your document to nearby players'
        },
        item = {
            enabled = true,
            name = 'ambulance-card'
        },
        prop = {
            name = 'prop_fib_badge'
        },
        animation = {
            dict = 'paper_1_rcm_alt1-9',
            anim = 'player_one_dual-9',
            bone_index = 28422
        },
        information = {
            { label = 'Job', value = 'job.label' },
            { label = 'Grade', value = 'job.grade_label' },
            { label = 'Date of birth', value = 'variables.dateofbirth' }
        },
        removeBackground = false,
        range = 5.0,
        time = 4.0
    }
}

3. Server Config (server/config.lua)

-- Custom Functions
Config.Notify = function(source, message, type)
    TriggerClientEvent('esx:showNotification', source, message, type)
end

-- Commands
Config.UseESXCommands = true -- If you want to use ESX commands, set this to true
Config.RegisterCommand = function(name, description, callback)
    if Config.UseESXCommands then
        ESX.RegisterCommand(name, 'user', function(player, args, error)
            callback(player)
        end, false, { help = description })    
    else
        RegisterCommand(name, function(source, args, raw)
            local player = ESX.GetPlayerFromId(source)
            callback(player)
        end, false)
    end
end

-- Items
Config.RegisterItem = function(name, callback)
    ESX.RegisterUsableItem(name, function(source)
        local player = ESX.GetPlayerFromId(source)
        callback(player)
    end)
end

PreviousInstallationNextExports

Last updated 11 months ago

Was this helpful?

📚