Customization

Using Editable Files

The resource includes editable.lua files for both client and server that allow developers to add custom functionality without modifying escrowed files.

Client-Side Customization

Edit client/editable.lua to:

  1. Override Notification Function:

-- Override SendNotification for custom notifications
local originalSendNotification = SendNotification
function SendNotification(message)
    -- Your custom notification code here
    exports.ox_lib:notify({title = 'AFK Warning', description = message})
    originalSendNotification(message) -- Call original if needed
end
  1. Add Custom Whitelist Checks:

-- Extend whitelist functionality
local originalIsWhitelisted = isWhitelisted
function isWhitelisted()
    -- Check custom conditions
    if IsPlayerInCustomGroup() then
        return true
    end
    return originalIsWhitelisted() -- Call original function
end
  1. Add Custom Event Handlers:

Server-Side Customization

Edit server/editable.lua to:

  1. Custom Kick Handler:

  1. Add Admin Commands:

  1. Integration with Other Resources:

Advanced Customization

Custom Detection Methods

While the main detection is in the escrowed client.lua, you can add additional checks in client/editable.lua:

Database Integration

You can log AFK kicks to a database in server/editable.lua:

Last updated