Events

Information regarding boii_base server command events

request_chat_suggestions

Event to send chat suggestions for commands to the client

RegisterServerEvent('boii_base:sv:request_chat_suggestions')
AddEventHandler('boii_base:sv:request_chat_suggestions', function()
    local src = source
    for _, suggestion in ipairs(boii.chat_suggestions) do
        TriggerClientEvent('boii_base:cl:register_chat_suggestion', src, suggestion.command, suggestion.help, suggestion.params)
    end
end)

request_permission_check

Event used to check a users permissions before firing a event

RegisterServerEvent('boii_base:sv:request_permission_check')
AddEventHandler('boii_base:sv:request_permission_check', function(unique_id, required_rank, action)
    local src = source
    boii.has_permission(unique_id, required_rank, function(has_perm)
        TriggerClientEvent(action, src, has_perm)
    end)
end)

Last updated