oopsies, thanks a lot for the quick reply! haha
Iād have to see the doorlock config.lua, something isnāt correct with it.
ik theres a quite a few cities that uses esx_advnacedgarage if it is ever possible you do take consideration of adding suppot for it would be awesome
Nice script! i just have some problems with the sql file getting sql error 1064
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TABLE sody_clubs
(
name
varchar(50) NOT NULL,
label
varchar(50) NOT ā at line 1 */
USE `essentialmode`;
CREATE TABLE `sody_clubs` (
`name` varchar(50) NOT NULL,
`label` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `sody_clubs_ranks` (
`id` tinyint(5) NOT NULL,
`club_name` varchar(50) NOT NULL,
`club_rank` tinyint(5) NOT NULL,
`club_rank_name` varchar(30) NOT NULL,
`club_rank_label` varchar(50) NOT NULL,
`pay` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `users` ADD `club` VARCHAR(30) NULL, ADD `club_rank` TINYINT(5) NULL;
INSERT INTO `sody_clubs` (`name`, `label`) VALUES ('hsmc', 'Hells Santos');
INSERT INTO `sody_clubs_ranks` (`id`, `club_name`, `club_rank`, `club_rank_name`, `club_rank_label`, `pay`) VALUES
(NULL, 'hsmc', 0, 'biker', 'prospect', 0),
(NULL, 'hsmc', 1, 'saa', 'medlem', 0),
(NULL, 'hsmc', 2, 'vicepresident', 'sergeant', 0),
(NULL, 'hsmc', 3, 'treasurer', 'Vice Pres', 0),
(NULL, 'hsmc', 4, 'owner', 'President', 0);
-- hsmc EXAMPLE --
INSERT INTO `addon_account` (`name`, `label`, `shared`) VALUES
('club_hsmc_bank', 'hsmc', 1),
('club_hsmc_black', 'hsmc Black', 1),
('club_hsmc_priv', 'hsmc Priv', 1),
('club_hsmc_pub', 'hsmc Pub', 1);
INSERT INTO `addon_account_data` (`id`, `account_name`, `money`, `owner`) VALUES
(NULL, 'club_hsmc_pub', 0, NULL),
(NULL, 'club_hsmc_priv', 0, NULL),
(NULL, 'club_hsmc_black', 0, NULL),
(NULL, 'club_hsmc_bank', 0, NULL);
INSERT INTO `addon_inventory` (`name`, `label`, `shared`) VALUES
('club_hsmc_pub', 'hsmc Public', 1),
('club_hsmc_priv', 'hsmc Private', 1),
('club_hsmc', 'hsmc', 1);
INSERT INTO `datastore` (`name`, `label`, `shared`) VALUES
('club_hsmc', 'hsmc', 1),
('club_hsmc_priv', 'hsmc Priv', 1),
('club_hsmc_pub', 'hsmc Pub', 1);
Is your database name actually āessentialmodeā?
Iād try to insert 1 section at a time to find out which one is actually the problem.
Added support for esx_advancedgarage. Make sure to change āConfig.GarageScriptā in the config.lua.
Updated a couple missing translation lines in the en locales as well.
ya i realized that it was the very first line thanks anyway! Another question is it possible to make support for james-garage?
nice thanks sody for implementing that for use advanced garage users my guyā¦ i do see that when i go into the vehicle stored list to choose what i want the list disappears after 5 seconds or so
so you gotta be fast to choose your cars or bikeā¦ any reason why?
It sy
SCRIPT ERROR: @sody_clubs/server.lua:363: attempt to compare nil with number
handler (@esx_addoninventory/server/main.lua:87)
handler (@sody_clubs/server.lua:357)
When I try to get the item from the box, I am giving this error.
I already found the error, this being used ālimitā has to be changed to āweightā new att do es_extended
Any way to add like police menu?
To drag, cuff, search etc
anyone have a tip on how id go about doing a āclub checkā instead of a job check? for example the club version of this Citizen.CreateThread(function()
while true do
Wait(0)
if ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' or ESX.PlayerData.job.name == 'ambulance' then?
@SodyFX Iām getting this error in my server console:
SCRIPT ERROR: @sody_clubs/server.lua:94: attempt to index a nil value (field '?')e[0m
e[93m> refe[0m (e[36m@sody_clubs/server.luae[0m:94)
While line 94 is:
MySQL.Async.fetchAll('SELECT club, club_rank FROM users WHERE identifier=@identifier', {['@identifier'] = xPlayer.identifier}, function(result)
if result[1].club then
local playerrank = tostring(result[1].club_rank)
local returntable = {
club = result[1].club,
club_rank = result[1].club_rank,
club_rank_name = Clubs[result[1].club].ranks[playerrank].club_rank_name
}
cb(returntable)
end
end)
end)
Iām not having the āclub_rank_nameā in my users table; am I supposed to?
Easiest way currently is to use a Callback:
ESX.TriggerServerCallback(āsody_clubs:getPlayerClubā, function(playerdata)
PlayerClub = playerdata.club
PlayerRank = playerdata.club_rank_name
PlayerRankNum = playerdata.club_rank
end)
I hadnāt planned on such a feature so it doesnāt interfere with other jobs.
No, but it does need to be in your config.lua and the club name needs to match what is in your database.
Easiest fix (I believe, I havenāt had a chance to test yet) is to replace these lines:
sourceItem.limit ~= -1 and (sourceItem.count + count) > sourceItem.limit
With:
not xPlayer.canCarryItem(itemName, amount)
When I get a chance to test it fully Iāll update the script, but just a warning, this is only for those who have updated to the most recent ESX with the weight update.
Is this still happening? Iām not too sure offhand Iād have to do more tests, this didnāt happen to me when I was coding for advanced garage.