[FREE] [RELEASE] Advanced Starter Pack System

Hey, just headed to bed rn, so wont be back for a bit, but having some issues… when i go up to the character to collect from, nothing happens, or shows up. I set a custom position for them at the police station near fantastic plaza, and I added a husky from keep-companion to the list of things you get. idk if the husky might be breaking it or sumn. also in the console im getting a database query error, Table ‘main.tcd_starterpack’ doesn’t exist. I’m using qb-target, ps-inventory, and mysql-async. also I’m using a john wick model wick2 from extra npcs pack, which shows up and works good. as well, when using the command to get the starter pack, it says I already got one. I think it’s the database query error, idk what to do to fix it. It looks like it’s coming from ox_lib, which i have installed so starterpack will run, and it looks like it’s trying to use oxmysql, even though it’s set to mysql-async. Screenshot of the error below. Also the character to collect from has a green orb around him, just a debug thing you have turned on while working rn? I just pulled from main a bit ago to update it. Anyways, as i said, headed to bed now, is late lol

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 :slight_smile:

1 Like

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

1 Like

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. :wink:

(post deleted by author)

1 Like

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.