πŸ–οΈCustomizing Player Spawn-In

Introduction

The FRY DEV Advanced Spawn Selector now offers a flexible and powerful feature for server administrators and developers: the ability to customize player spawn-in functions. This new capability allows for a more personalized and controlled spawn experience for players on your server.

Custom Spawn-In Functionality

At the core of this feature is the CUSTOM.SPAWN_IN_WITH_DATA function. This function is designed to handle the player's spawn-in process and can be tailored to fit the specific needs of your server.

How It Works

The function works by utilizing a switch statement to handle different frameworks. Currently, there are cases for qbcore and qbx, with a placeholder for a custom framework. Each case can trigger specific events or functions.

client -> cl_custom.lua -> line: 553

CUSTOM.SPAWN_IN_WITH_DATA = function(self)
    switch(Config.SETTINGS.FRAMEWORK, {
        ["qbcore"] = function()
            --- YOUR CODE
        end,
        ['qbx'] = function()
            --- YOUR CODE
        end,
        ["custom"] = function()
               --- YOUR CODE
        end,
    })
end

Customizing for Custom Framework

In the ["custom"] case, you can insert your own logic and functions to create a unique spawn-in experience. This can include custom events, data handling, or any other functionality you wish to implement.

Last updated

Was this helpful?