FRY DEVELOPMENT
TEBEXYOUTUBEDISCORD
  • πŸ“–Welcome
  • Information
    • πŸ”‘Licensing System
    • πŸ“ƒTerms of Service (ToS)
  • πŸ—ΊοΈSPAWN SELECTOR
    • ℹ️Basic Step
    • πŸ”ŒIntegration
      • πŸ’»FW: QBCore
      • πŸ’»FW: QBX
      • 🏬Setup Apartments
      • ☁️Weather Sync
    • βš™οΈConfiguration Settings
      • 🎨UI Customization Guide
      • πŸ› οΈConfig
      • 🌐Translation
      • πŸ–οΈCustomizing Player Spawn-In
    • πŸ› οΈCommon Issues
      • Soon Edit
Powered by GitBook
On this page
  • Introduction
  • Custom Spawn-In Functionality
  • How It Works
  • Customizing for Custom Framework

Was this helpful?

  1. SPAWN SELECTOR
  2. Configuration Settings

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.

PreviousTranslationNextCommon Issues

Last updated 1 year ago

Was this helpful?

πŸ—ΊοΈ
βš™οΈ
πŸ–οΈ