πŸ“–
Nelo Scripts
  • πŸ‘‹Hello
  • QBCore
    • πŸ”³Group - Tablet
      • βš™οΈInstallation
      • ❓How to?
        • πŸ“Œ1. Group and Task ID
          • #️⃣Group ID
            • ℹ️Change Status
              • ⏺️Members Status
            • 4️⃣Number of Members
            • πŸ”„Get Groups
              • 🌐Empty table
          • 🈁Create Task
        • 🚦2. Sync Members
          • πŸ–±οΈClient and Server
  • ESX
    • πŸ”³Group - Tablet
      • βš™οΈInstallation
      • ❓How to?
        • πŸ“Œ1. Group and Task ID
          • #️⃣Group ID
            • ℹ️Change Status
              • ⏺️Members Status
            • 4️⃣Number of Members
            • πŸ”„Get Groups
              • 🌐Empty table
          • 🈁Create Task
        • 🚦2. Sync Members
          • πŸ–±οΈClient and Server
Powered by GitBook
On this page
  1. QBCore
  2. Group - Tablet
  3. How to?

1. Group and Task ID

The basics to retrieve information from the current Group and current Task.


local QBCore = exports['qb-core']:GetCoreObject()
  1. First, you need to have empty variables at the top of your script; they will receive the information later.

local GroupID
local TaskTitle
  1. We also need to create an Client Event so that we can update the members with the information shortly!

RegisterNetEvent('--:client:ReceiveInfoGroup')
AddEventHandler('--:client:ReceiveInfoGroup', function(receivedGroupID, receivedTaskTitle)
    -- Here, we update the variables!
    GroupID = receivedGroupID
    TaskTitle = receivedTaskTitle
end)
-- You can call the event in this way if you want to update it for all members.
-- TriggerServerEvent('nelo_tablet:server:GroupEvent', GroupID, "client", "--:client:ReceiveInfoGroup")
-- #Don't worry, you'll learn how to manipulate group events later on.

Last updated 1 year ago

πŸ”³
❓
πŸ“Œ