๐Ÿ”ดStep 1 - Items installation

The script has an auto-installation feature for qb-core.

All you need to do is substitute the following code at the bottom of the resources/[ks_myspells]/ks-magic/config.lua file:

Config.AutoAddQBItems = { -- This is only for QB Framework if using ESX Ignore this if you can't use this on QB Please set this on false and that should do it!
    ['p1'] = {
        name = 'p1',
        label = 'Health Potion',
        weight = 10,
        type = 'item',
        image = 'p1.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Heals you'    
    },
    ['p2'] = {
        name = 'p2',
        label = 'Shield Potion',
        weight = 10,
        type = 'item',
        image = 'p2.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Gives you shield'    
    },
    -->>>>>>>  Use Animal Potion once you added your own fixpj event at "custom/client.lua"  <<<<<<<--
    ['p3'] = { 
        name = 'p3',
        label = 'Animal Potion',
        weight = 10,
        type = 'item',
        image = 'p3.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Turns you into a random animal for some time'    
    },
    ['p4'] = {
        name = 'p4',
        label = 'Invisibility Potion',
        weight = 10,
        type = 'item',
        image = 'p4.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Makes you invisible for some time'    
    },
    ['p5'] = {
        name = 'p5',
        label = 'Speed Potion',
        weight = 10,
        type = 'item',
        image = 'p5.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Makes you go faster for some time'    
    },
    ['cristal_ball'] = {
        name = 'cristal_ball',
        label = 'Crystal Ball',
        weight = 10,
        type = 'item',
        image = 'cristal_ball.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Gives you a random item',
    },
    ['ouija'] = {
        name = 'ouija',
        label = 'Ouija Board',
        weight = 10,
        type = 'item',
        image = 'ouija.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Allows you to talk to the dead',
    },
}

Remember to save the file.

Now locate the folder resources/[qb]/qb-inventory/html/images/ and copy the content of the resources/[ks_myspells]/ks-magic/ICON folder into it

And you're ready to go!

If your qb-core is outdated and doesn't support the auto-installation feature, please add only the items to your items list in your qb-core

    ['p1'] = {
        name = 'p1',
        label = 'Health Potion',
        weight = 10,
        type = 'item',
        image = 'p1.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Heals you'    
    },
    ['p2'] = {
        name = 'p2',
        label = 'Shield Potion',
        weight = 10,
        type = 'item',
        image = 'p2.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Gives you shield'    
    },
    -->>>>>>>  Use Animal Potion once you added your own fixpj event at "custom/client.lua"  <<<<<<<--
    ['p3'] = { 
        name = 'p3',
        label = 'Animal Potion',
        weight = 10,
        type = 'item',
        image = 'p3.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Turns you into a random animal for some time'    
    },
    ['p4'] = {
        name = 'p4',
        label = 'Invisibility Potion',
        weight = 10,
        type = 'item',
        image = 'p4.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Makes you invisible for some time'    
    },
    ['p5'] = {
        name = 'p5',
        label = 'Speed Potion',
        weight = 10,
        type = 'item',
        image = 'p5.png',
        unique = false,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Makes you go faster for some time'    
    },
    ['cristal_ball'] = {
        name = 'cristal_ball',
        label = 'Crystal Ball',
        weight = 10,
        type = 'item',
        image = 'cristal_ball.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Gives you a random item',
    },
    ['ouija'] = {
        name = 'ouija',
        label = 'Ouija Board',
        weight = 10,
        type = 'item',
        image = 'ouija.png',
        unique = true,
        useable = true,
        shouldClose = true,
        combinable = nil,
        description = 'Allows you to talk to the dead',
    },

Last updated