EZ Scripts
DiscordTebex
  • 💡Welcome To EZ Scripts
  • FIVEM
    • 🍀EZ White Widow
      • Config File
      • Add more locations
      • Common Issues
    • 🟣EZ Lean Drug
      • Config File
      • Add more locations
    • ❄️EZ Coke & Crack Drug
      • Config File
      • Add more locations
    • 🔠EZ Plate Changer
      • Config File
    • 📑Ez Lib
      • Config File
    • 🛡️Ez Admin Authority
      • Config File
    • 🫳Ez Item Spawner
      • Config File
      • Permission Check
      • Add Item
      • Get Items
  • RedM
    • 💼EZ Society & Job Meny
      • Config File
      • Exports
      • Syn Society
    • 🌍EZ Fast Travel
      • Config File
    • 🛡️Ez Admin Authority
      • Config File
    • 🍖Ez Consumables
      • Config File
    • 📺Ez HUD
      • Config File
      • Exports and Events
    • 🚷EZ Combat Logging
      • Config File
    • 🗽EZ Life Style
      • Getting Life Style
      • Config File
    • ☢️EZ Radial Menu
      • Config File
    • 🫳Ez Item Spawner
      • Config File
      • Permission Check
      • Add Item
      • Get Items
Powered by GitBook
On this page
  • STEP 1 - Add get employees event
  • STEP 2 - Hire player
  • STEP 3 - Fire player
  • STEP 4 - Rank Change

Was this helpful?

  1. RedM
  2. EZ Society & Job Meny

Syn Society

If you use Syn Society, our script offers to use multi job menu only, with syn society. You need to make changes in syn_society/client/main.lua.

PreviousExportsNextEZ Fast Travel

Last updated 13 days ago

Was this helpful?

STEP 1 - Add get employees event

Syn Society, like any other society, requires employee management, hence it requires to fetch players with the job. To make this work you require to fetch it through our player jobs table.

1) Anywhere within the script, add the following event... Code:

RegisterNetEvent("ez_society:getEmployees", function(employees)
  ez_employees = employees
end)

Example:

2) ... then we want to fetch the employees from the server side everytime they open the society menu. Search for the following: TriggerServerEvent("syn_society:getinvslots") and below it, put the following code... Code:

TriggerServerEvent("ez_society:server:getEmployees", playerjob)
while ez_employees == nil do
  Wait(100)
end

Example:

STEP 2 - Hire player

To make this work you must also hire a player for the job menu.

Search for TriggerServerEvent("syn_society:hire", playerid, playerjob) and put the following line of code either above or below...

TriggerServerEvent("ez_society:server:hireEmployee", playerjob, playerid, Config.jobs[playerjob].recruitmentrank)

Example:

STEP 3 - Fire player

To make this work you must also fire player from the job menu.

Search for WarMenu.IsMenuOpened('fire') replace the whole code block which looked like ...

for i = 1, #online do
  if WarMenu.Button("ID: " .. online[i].no .. "//  " .. online[i].name) then
    if Config.vorp then
      TriggerServerEvent("syn_society:fire", online[i].charid)
    else
      TriggerServerEvent("syn_society:fire", online[i].no)
    end
    WarMenu.CloseMenu()
  end
end

with...

for i = 1, #ez_employees do
  if WarMenu.Button("ID: " .. ez_employees[i].no .. "//  " .. ez_employees[i].name) then
    TriggerServerEvent("ez_society:server:fireEmployee", ez_employees[i], Config.jobs[playerjob].recruitmentrank)
  end
end

Example:

STEP 4 - Rank Change

To make this work you must also set player rank from the job menu.

Search for WarMenu.IsMenuOpened('setrank') replace the whole code block which looked like ...

for i = 1, #online do
  if online[i].jobgrade ~= nil then 
    if WarMenu.Button("ID: " .. online[i].no .. "//  " .. online[i].name .. Config.Language.listrank .. online[i].jobgrade) then
      if Config.vorp then
        TriggerEvent("syn_inputs:sendinputs", Config.Language.confirm, Config.Language.rank, function(cb)
          local rank = tonumber(cb)
          TriggerServerEvent("syn_society:setrank", online[i].charid, rank)              
        end)
      elseif Config.redem then
        TriggerEvent("syn_inputs:sendinputs", Config.Language.confirm, Config.Language.rank, function(cb)
          local rank = tonumber(cb)
          TriggerServerEvent("syn_society:setrank", online[i].no, rank)
        end)
      end
      WarMenu.CloseMenu()
    end
  else
    if WarMenu.Button("ID: " .. online[i].no .. "//  " .. online[i].name .. Config.Language.listrank) then
      if Config.vorp then
        TriggerEvent("syn_inputs:sendinputs", Config.Language.confirm, Config.Language.rank, function(cb)
          local rank = tonumber(cb)
          TriggerServerEvent("syn_society:setrank", online[i].charid, rank)              
        end)
      elseif Config.redem then
        TriggerEvent("syn_inputs:sendinputs", Config.Language.confirm, Config.Language.rank, function(cb)
          local rank = tonumber(cb)
          TriggerServerEvent("syn_society:setrank", online[i].no, rank)
        end)
      end
      WarMenu.CloseMenu()
    end
  end
end

with...

for i = 1, #ez_employees do
  if WarMenu.Button("ID: " .. ez_employees[i].no .. "//  " .. ez_employees[i].name .. Config.Language.listrank .. ez_employees[i].grade) then
    TriggerEvent("syn_inputs:sendinputs", Config.Language.confirm, Config.Language.rank, function(cb)
      local rank = tonumber(cb)
      TriggerServerEvent("ez_society:server:changeGrade", ez_employees[i], rank, Config.jobs[playerjob].recruitmentrank)
    end)
    WarMenu.CloseMenu()
  end
end

Example:

💼