Exports // Triggers

EXPORTS Lua code examples for Client Side

local getIdGroup = exports["sfctab"]:getMyGroup()
print(getIdGroup) -- return 0 if you havent group, return number>0 if you have group
local myGrade = exports["sfctab"]:getMyGrade()
print(myGrade) -- return number grade (0, 1, 2, 3, 9, 10)

TRIGGERS Lua code examples for Client Side

TriggerEvent("sfctab:createnew") -- Creates a new organization if you don't belong to an organization.
TriggerEvent("nuifix") -- if the NUI breaks.

EXPORTS Lua code examples for Server Side

VariableType

id_mission

number

crime_group_id

number

local result = exports["sfctab"]:setFailedMission(id_mission, crime_group_id) -- set the mission as failed
print(result) -- return false(if an error occurred) or true
local result2 = exports["sfctab"]:setSuccessMission(id_mission, crime_group_id) -- set the mission as successful
print(result2) -- return false(if an error occurred) or true
local idPlayer = "char1:xxxxx" -- for e.g.
local groupPlayer = exports["sfctab"]:getGroupPlayer(idPlayer)
print(groupPlayer) -- return 0 if player haven't group OR idGroup > 0
local idPlayer = "char1:xxxxx" -- for e.g.
local gradePlayer = exports["sfctab"]:getGradePlayer(idPlayer)
print(gradePlayer) -- return number grade (0, 1, 2, 3, 9, 10) if player have group or false if haven't group
local idGroup = 1 -- for e.g.
local result = exports["sfctab"]:removeGroup(source, idGroup)
print(result) -- return true or false

Last updated