Evolent Boosting

Data Type Reference

This section outlines the primary data structures used throughout the resource.

---@class Step
---@field title string                             -- Title displayed for the current mission step
---@field locations vector4[]                      -- Array of coordinates relevant to the step (x, y, z, heading)
---@field isComplete fun(self: Step, contract: Contract, location: vector4): boolean -- REQUIRED: Server-side validation check for step completion
---@field preparation? fun(self: Step, contract: Contract, location: vector4): any -- Optional setup function executed when the step begins
 
---@class Mission
---@field steps Step[]                             -- Sequence of steps required to complete the mission
---@field requiredItems table<string, number>      -- Items required to start the mission (Item name count)
 
---@class ItemData
---@field name string
---@field label string
---@field count number
 
---@class CarData
---@field model string
---@field label string
 
---@class Profile
---@field stateId number                           -- The player's unique identifier (e.g., QBCore/ESX player ID)
---@field username string
---@field imageUrl string
---@field rep number
---@field elo number
---@field wins number
---@field loses number
---@field source number                            -- The server source ID (e.g., network ID)
 
---@class Contract
---@field id string                                -- Unique contract ID
---@field leaderId string                          -- Unique identifier of the contract group leader
---@field classId number                           -- Mission difficulty tier (1-6)
---@field classLabel string                        -- Mission difficulty label (e.g., 'Low', 'Mid')
---@field requiredLevel number
---@field missionId string                         -- The mission's registered key (e.g., 'paint', 'test')
---@field mission Mission                          -- The Mission object containing steps
---@field car CarData                              -- Details of the target vehicle
---@field elo number                               -- Elo change on completion
---@field rep number                               -- Reputation change on completion
---@field currentStep number                       -- Index of the current active step
---@field isStepActive boolean
---@field duration number
---@field group Profile[]                          -- List of all players currently in the contract group
---@field plate string                             -- Plate of the target vehicle
---@field requiredItems ItemData[]
---@field itemRewards ItemData[]
---@field data table<string, any>                  -- Arbitrary server-side state shared with the client's StepData
---@field pendingInvites table<number, string>     -- Invites awaiting response