π1. Group and Task ID
The basics to retrieve information from the current Group and current Task.
local QBCore = exports['qb-core']:GetCoreObject()
First, you need to have empty variables at the top of your script; they will receive the information later.
local GroupID
local TaskTitle
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