# Exports // Triggers

## EXPORTS Lua code examples for Client Side

```lua
local getIdGroup = exports["sfctab"]:getMyGroup()
print(getIdGroup) -- return 0 if you havent group, return number>0 if you have group
```

```lua
local myGrade = exports["sfctab"]:getMyGrade()
print(myGrade) -- return number grade (0, 1, 2, 3, 9, 10)
```

## TRIGGERS Lua code examples for Client Side

```lua
TriggerEvent("sfctab:createnew") -- Creates a new organization if you don't belong to an organization.
```

```lua
TriggerEvent("nuifix") -- if the NUI breaks.
```

## EXPORTS Lua code examples for Server Side

<table><thead><tr><th>Variable</th><th width="274.3333333333333">Type</th><th data-hidden></th></tr></thead><tbody><tr><td>id_mission</td><td>number</td><td></td></tr><tr><td>crime_group_id</td><td>number</td><td></td></tr></tbody></table>

<pre class="language-lua"><code class="lang-lua"><strong>local result = exports["sfctab"]:setFailedMission(id_mission, crime_group_id) -- set the mission as failed
</strong>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
</code></pre>

```lua
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
```

```lua
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
```

```lua
local idGroup = 1 -- for e.g.
local result = exports["sfctab"]:removeGroup(source, idGroup)
print(result) -- return true or false
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scriptsfivem.com/resources/sfctab/exports-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
