forgor screenshot lol
Have you added the SQL to your database?
CREATE TABLE IF NOT EXISTS `tcd_starterpack` (
`id` int AUTO_INCREMENT PRIMARY KEY,
`identifier` varchar(255) DEFAULT NULL,
`date_received` varchar(10) DEFAULT NULL,
`received` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
I think the main problem is that the tcd_starterpack
table doesnāt exist in your database. If there were issues with external functions or queries, the error message would be different.
Also, it doesnāt matter whether you use mysql-async
or oxmysql
since they function similarly. Ensure your database is properly configured.
Thank you! This fix worked
Back now :3 I hadnt, because i never saw anywhere that i had to. Probably good to add that, so people know they have to do that when installing your mod. Or you could add a check when the mod is started on server start to see if that table exists, and if it doesnt, add it. I havent worked with FiveM mods before this, but ill have a look to see where that could be added maybe. Also, best dev to work with, usually responds within a couple hours :3
Yeah, I apologize for not providing the proper installation instructions for my resource, but Iām planning to create our own documentation site. That would be a better place to read the guides and instructions. I really appreciate your reply.
Alright, adding the table worked! I tried adding the query to when starterpack is started, but idk what Iām doing, never worked with lua before lol. I got it to add the table the first time someone tries to claim a starterpack, but then had to restart the server for it to start working. So maybe auto creating it isnāt possible, idk. But I still had to use the command to get it, nothing happened when walking up to the character to collect from. As well the green orb around them as well still. Iām trying to figure out the positioning for the vehicle tho, it spawns in the right spot, itās just the orientation I need to get right. Any idea why pickup from the character isnāt working? Because I have give by command on? And the green orb?
Screenshots showing the orb, and orientation of the car when spawned, currently set to spawn at 419, -948.9417, 29.22528, 243.17. What do the values of the vec4 repersent? Iām guessing the last one is rotation, but what rotation points in what direction? Also no idea how qb core works or anything, what happens to stuff you had with you when you log out? I logged back in and my inventory was empty
nvm about the position stuff, got it figured out, car spawns facing the right way now lol. But still canāt collect from the person
I have a problem, the car is delivered to you but it is not given to you personally, it is as if it were a rental car.
The car itself has been directly stored in the āowned_vehicleā table if you are using the ESX Framework, and it should be given to you as you are the owner of the vehicle. If you have a custom key, please do set it in the config.
---@param vehicle any
---@return string
---@decription If you have a custom vehicle key system you can give the key to the player
Config.GiveKey = function(vehicle)
local Core, Framework = GetCore()
if Framework == "esx" then
-- ESX Vehicle Key System
else
TriggerEvent("vehiclekeys:client:SetOwner", Core.Functions.GetPlate(vehicle))
end
end
Furthermore, if you are still facing issues, make sure no other resources are causing problems with the starter pack. Sometimes this happens.
I have jaksamās vehicles key system
So on QB-Core it doesnt seem to save the vehicle to the database, Not sure of what to change for that
I have a problem, when I claim the starter pack the car canāt be put in the garage. Do you have a solution?
Any further updates on this? I still canāt claim from the character, Iām still stuck using the command
is it possible to give licenses for example driving licenses players?
Hello everyone, sorry I havenāt made any updates recently. Iāve been busy maintaining our server. I plan to update the resources to add more helpful features soon.
Is there a way to add players discord id of fivem license number instead of the different characters they create?
Like have it to where it only gives it to one user no matter what char they on. They can make and delete char to exploit the script.
I havenāt implemented this kind of feature yet, but itās also a good suggestion, especially for those roleplay servers that allow their players to delete their own characters. I might consider implementing this and will add it to my list. Thanks for the suggestion!