[RELEASE] sody_clubs - ESX Clubs/Gangs Society Add-on [DEPRECATED] [DISCONTINUED]

Does anyone have this working with esx_jb_eden_garage2 ??

I’m getting an error for a Callback saying it doesn’t exist after I removed the resource. Nothing wrong with it, we just decided to not use it. Removed everything from the DB including the slot in the Users. Does this hook somewhere else that I am missing?

If you made changes to esx_doorlock you’ll need to undo those.

If it has a similar database structure as eden_garage it should work.

Ah, thank you!

Hello, is it possible to add AuthorizedWeapons to this. So you could buy weapons from the storage menu or from somewhere

Have you tried to integrate with esx_inventoryhud?

hello i get this error when i deposit items what is the problem?

es_extended version

I used a snippet from a shop script that has worked effectivly when needing to restart the script on the fly or while the server is up:

ESX = nil

local hasSqlRun = false

TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)

AddEventHandler(‘onMySQLReady’, function()

hasSqlRun = true

LoadClubs()

end)

– extremely useful when restarting script mid-game

Citizen.CreateThread(function()

Citizen.Wait(2000) -- hopefully enough for connection to the SQL server

if not hasSqlRun then

    LoadClubs()

    hasSqlRun = true

end

end)

function LoadClubs()

–AddEventHandler(‘onResourceStart’, function(resourceName) – For debugging to start/stop resources without server restart

Wait(2000) -- For debugging to start/stop resources without server restart

local result = MySQL.Sync.fetchAll('SELECT * FROM sody_clubs', {})

for i=1, #result, 1 do

    Clubs[result[i].name] = result[i]

    Clubs[result[i].name].ranks = {}

    table.insert(ClubList, result[i].name)

    ClubListFull[result[i].name] = result[i].label

end

local result2 = MySQL.Sync.fetchAll('SELECT * FROM sody_clubs_ranks', {})

for i=1, #result2, 1 do

    Clubs[result2[i].club_name].ranks[tostring(result2[i].club_rank)] = result2[i]

end

TriggerClientEvent('sody_clubs:forceSync', -1)

nextReset = GetGameTimer() + Config.PayInterval

startClubPayCycle()

end

Sorry for the lack of responses all it’s been a crazy time lately as you all know.

I don’t have an “official” update for the es_extended latest release. I’m working on upgrading my own server and it’s taking some time to re-do a lot of my custom edits to ESX itself in the new version. @Aura_RP_BR was kind enough to make these edits and release his server.lua which looks correct to me. Everyone should be able to utilize this for the time being if you can’t wait for my slowness :slight_smile: @Mintic

@Beowulf_50 I’m not familiar with this, is this through a certain script? Are we talking about the esx_weaponshop script? It should be possible to set up a quick “club check” before a purchase in any case.

@Seamus_McMasters I actually do want to do this, as I use inventoryhud myself. I will be working on this in the near future and will release an add-on for esx_inventoryhud. I created a duffle bag script which is integrated into it so I have a proper understanding on how to integrate sody_clubs now.

How hard is to add a UI labels ingame so ppl can see their Club and Rank? maybe through es extended?

Which UI? Very easy though, make a quick server call to the database to see which club they’re in. I don’t have a quick command built-in at the moment. Since people need to get the club name/ranks, I am going to build in an export command soon for clubs (like pNotify or Mythic notifications do basically).

The resmon for this resource is 0.6-1.9 MS which is pretty high for ESX server.

I found out the root cause of this. There is a line around 698 in client.lua. “ESX.Table.SizeOf(zones) > 0” which is causing the performance to a lot high.

I got 0.06 MS after removing that lines. Please look into it and we can save a lot of clients CPU usage :slight_smile:

Detailed info :

how did you remove it without ruining the script?

Hello, I downloaded the script, I configured it as I wanted it to be config and I started it on my server but I have no point except the garage point

Did you add yourself to the club via the database before restarting or using /setclub ?

I was wondering the same thing. If people would like more of a command-based version of this script so there aren’t all of these Wait timers, I can see that working and saving resources.

1 Like

I used the /setclub and even after several reboots the points were not there.
Thank you for taking your time to try to resolve my problem.
image

Which version of ESX are you on? Most likely you’re missing the ESX.Table function and that’s why you’re seeing that error.