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?
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 @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
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.
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.
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.