PoisonCode Docs
TebexDiscordYoutube
  • SCRIPTS
    • 💡pc_collections
      • ✨Features
      • 🖥️Installation & dependencies
      • 🛠️Exports & events
      • ⚙️Open files preview
      • 🔧Tutorials
      • 📥Updates
        • 🤔How to update
        • 🔌Version compatibility
    • 💎pc_organizations
      • ✨Features
      • 🖥️Installation & dependencies
      • 🛠️Exports & events
      • ⚙️Open files preview
      • 🔧Tutorials
      • 📥Updates
        • 🤔How to update
        • 🔌Version compatibility
    • 💡pc_skills
      • ✨Features
      • 🖥️Installation & dependencies
      • 🛠️Exports & events
      • ⚙️Open files preview
      • 🔧Tutorials
      • 📥Updates
        • 🤔How to update
    • 📦pc_airdrop
      • ✨Features
      • 🖥️Installation & dependencies
      • ⚙️Open files preview
      • 🔧Tutorials
      • 📥Updates
        • 🤔How to update
    • 💬pc_notifications
      • ✨Features
      • 🖥️Installation & dependencies
      • 🕹️Usage
Powered by GitBook
On this page

Was this helpful?

  1. SCRIPTS
  2. pc_organizations

Tutorials

These tutorials will walk you through all the options available.

PreviousOpen files previewNextUpdates

Last updated 4 months ago

Was this helpful?

Adding ox_doorlock support

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 IsPlayerInGroupfunction on line 41, to look like this:

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.

Adding and removing players from organizations

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

Resetting (clearing) the organization

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.

Removing PolyZone integration

Soon*

💎
🔧