# Tutorials

<details>

<summary>Adding ox_doorlock support</summary>

Organization is not a job, so if you want use it with doorlock (for example ox\_doorlock) you need to make some modifications.

Navigate to `server/framework/es_extended.lua` modify `IsPlayerInGroup`function on line 41, to look like this:

```lua
function IsPlayerInGroup(player, filter)
    local type = type(filter)

    if type == 'string' then
        if player.job.name == filter then
            return player.job.name, player.job.grade
        end

        if player.get("org").name == filter then
            return player.get("org").name, 0
        end
    else
        local tabletype = table.type(filter)

        if tabletype == 'hash' then
            local grade = filter[player.job.name]

            if grade and grade <= player.job.grade then
                return player.job.name, player.job.grade
            end

            if filter[player.get("org").name] and true and 0 <= 0 then
                return player.get("org").name, 0
            end
        elseif tabletype == 'array' then
            for i = 1, #filter do
                if player.job.name == filter[i] then
                    return player.job.name, player.job.grade
                end

                if player.get("org").name == filter[i] then
                    return player.get("org").name, 0
                end
            end
        end
    end
end
```

Add the doorlock as you normally would for a job which in this case will be organization name. Script will now recognize organizations as jobs, but they will remain independent anywhere else.

<img src="/files/9g9u84Kz99kS4TnSiyyI" alt="" data-size="original">

</details>

<details>

<summary>Adding and removing players from organizations</summary>

You can use `/setorg [id] [org_name]`to add player to organization. Adding player this way will grant them all permissions, so it's recommended only for the leader. Leader can hire new members through tablet.

If you want to remove a player from an organization use `/setorg [id] unemployed` Members can also be removed through tablet with the fire option.

Being (or not) in an organization does not affect player's job

</details>

<details>

<summary>Resetting (clearing) the organization</summary>

If, for whatever reason, you want to reset organization (reset all upgrades to 0, remove items & members etc.) you can use `/resetorg [org_name]`command.

</details>

<details>

<summary>Removing PolyZone integration</summary>

Soon\*

</details>


---

# 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.poisoncode.com/scripts/pc_organizations/tutorials.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.
