Events

Information regarding boii_base inventory events

open_character_create

Event used to open or reopen the multicharacter UI.

RegisterNetEvent('boii_base:cl:open_character_create', function()
    DoScreenFadeOut(1000)
    Wait(2000)
    boii.setup_character_create()
    DoScreenFadeIn(1000)
end)

get_character_list

Event used to get players characters on join

RegisterNetEvent('boii_base:cl:get_character_list', function()
    TriggerServerEvent('boii_base:sv:get_character_list')
end)

receive_characters

Event used to receive the players character data from the server and send a nui message to open the multicharacter UI

RegisterNetEvent('boii_base:cl:receive_characters', function(characters)
    SendNUIMessage({
        action = 'open_character_create',
        characters = characters
    })
end)

validation_result

The framework uses a unique first and last name for each character. This is the event used to receive the validation result of the characters name from the server.

RegisterNetEvent('boii_base:cl:validation_result', function(is_name_valid)
    if is_name_valid then
        SendNUIMessage({
            action = 'validate_name',
            valid = true
        })
    else
        SendNUIMessage({
            action = 'validate_name',
            valid = false
        })
    end
end)

Last updated