#Ox_inventory NP2.0 design

151 messages · Page 1 of 1 (latest)

indigo roost
#

Remade the Ox_inventory nopixel design with the latest release of ox_inventory,

I started off with the durple scss file as a base since I wanted to keep the weight based colors.
then I made my way though qw's ox_inventory to recreate parts of the inventory and colors.
After finishing that i was able to recreate the hotslot from sleepyexe's ox_inventory and fix an annoying bug related to the hotslot.

There are 2 variant's

  1. Same grid no hotslot

  2. Grid and hotslot.

Hopefully there shouldn't be any major bugs if so let me know 🙂
https://github.com/RazerGhost/ox_inventory-NP-2.0/releases

Note: there is a chance that the hotslot version may look misaligned due to the different screen sizes

grand swift
#

Gg man was searching it

hushed thorn
#

Love it

grand swift
#

where i can find the master for the hotslot one i play in 2k i wanna try to add it

indigo roost
#

Should be in the branches

grand swift
#

Right I’m dumb

lapis lagoon
#

I have a question? Is there only supposed to be 30 slots on hot slot version can’t seem to get past that even when setting it right in the init file, amazing release!

indigo roost
#

If not then I have something to figure out

hushed thorn
#

you have to edit in the src coce

#

code

#

on the nui

#

web src

indigo roost
#

Damn that's quite annoying, they have convars for setting the amount of slots but then it won't work lol

#

Well If you needed an edited version of the slots Stone lmk and I'll try to get it to you

lapis lagoon
cunning hedge
#

the 2nd variant kinda buggy no items appear on shops and inventory slot cap to 30 with convar set to 50

indigo roost
grand swift
indigo roost
grand swift
indigo roost
#

If you want this but QB inventory use ps-inventory

grand swift
#

anyway thanks boss

outer prawn
#

it takes 10 sec to do that

rain scaffold
#

thats the one without hotbar 🙂

grand swift
rain scaffold
#

you took the top one

#

is the other one - the top is the one you have

hushed thorn
#

ox_inventory/web/src/components/inventory/InventoryGrid.tsx

#

line 9

#

i made mine

const PAGE_SIZE = 47;
indigo roost
#

Still interesting that the convars don't do a thing

#

Only made minor changes to edit out the 5 hotslots

hushed thorn
#

i wanna do the same test on the default one to see if it works

indigo roost
#

If that works then I did something wrong somewhere

#

Or it's because of the hotslots that get taken out

#

But I probably know the reason the shop inventory doesn't work correctly

rough epoch
#

The convar didn't work since the performance update

#

I made 2 variables for the page size

#

Then when mapping the item you need validation if the inventory type is player

indigo roost
indigo roost
indigo roost
cunning hedge
indigo roost
#

its in the branch

lapis lagoon
indigo roost
lapis lagoon
delicate osprey
#

anyone know ox_inventory intergrate with qb-apartment which stash not open

lapis lagoon
#

add to client> main.lua> line 21 paste

-- ox_inventory compatibility
local ox_inventory = nil
if GetResourceState('ox_inventory') ~= 'missing' then
    ox_inventory = exports.ox_inventory
end

replace in >client>main.lua

-- RegisterNetEvent('apartments:client:OpenStash', function()
--     if CurrentApartment ~= nil then
--         --TriggerServerEvent("inventory:server:OpenInventory", "stash", CurrentApartment)
--         TriggerServerEvent("inventory:server:OpenInventory", "stash", CurrentApartment, {
--             maxweight = 2000000, -- Weight in grams (4000kg)
--             slots = 200, -- Total Slots
--         })
--         TriggerServerEvent("InteractSound_SV:PlayOnSource", "StashOpen", 0.4)
--         TriggerEvent("inventory:client:SetCurrentStash", CurrentApartment)
--     end
-- end)

with

    if CurrentApartment ~= nil then
        TriggerServerEvent("InteractSound_SV:PlayOnSource", "StashOpen", 0.4)
        if not ox_inventory then
            TriggerServerEvent("inventory:server:OpenInventory", "stash", CurrentApartment)
            TriggerEvent("inventory:client:SetCurrentStash", CurrentApartment)
        else
            if not ox_inventory:openInventory('stash', CurrentApartment) then
                TriggerServerEvent('qb-apartments:server:RegisterStash', CurrentApartment, Apartments.Locations[ClosestHouse].label)
                ox_inventory:openInventory('stash', CurrentApartment)
            end
        end
    end
end)

replace server> main.lua

-- RegisterNetEvent('apartments:server:UpdateApartment', function(type, label)
--     local src = source
--     local Player = QBCore.Functions.GetPlayer(src)
--     MySQL.update('UPDATE apartments SET type = ?, label = ? WHERE citizenid = ?', { type, label, Player.PlayerData.citizenid })
--     TriggerClientEvent('QBCore:Notify', src, Lang:t('success.changed_apart'))
--     TriggerClientEvent("apartments:client:SetHomeBlip", src, type)
-- end)

with

RegisterNetEvent('apartments:server:UpdateApartment', function(type, label)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    MySQL.update('UPDATE apartments SET type = ?, label = ? WHERE citizenid = ?', { type, label, Player.PlayerData.citizenid })
    TriggerClientEvent('QBCore:Notify', src, Lang:t('success.changed_apart'))
    TriggerClientEvent("apartments:client:SetHomeBlip", src, type)
    if ox_inventory then
        local result = MySQL.query.await('SELECT * FROM apartments WHERE citizenid = ?', { Player.PlayerData.citizenid })
        if result[1] ~= nil then
            TriggerEvent('qb-apartments:server:RegisterStash', result[1].name, label) -- rename the stash name in case of apartment change
        end
    end
end)

add to server>main.lua

if GetResourceState('ox_inventory') ~= 'missing' then
    ox_inventory = exports.ox_inventory
    RegisterNetEvent('qb-apartments:server:RegisterStash', function(currentApartmentId, currentApartmentLabel)
        ox_inventory:RegisterStash(currentApartmentId, currentApartmentLabel and 'Stash - '..currentApartmentLabel..' Apartment' or 'Apartment Stash', 100, 1000000)
    end)
end

delicate osprey
#

@lapis lagoon you're legend appreciated

buoyant plover
#

100 %

young gust
#

???????????

#

@lapis lagoon

glossy charm
young gust
#

Why don't I have the same style?

drowsy briar
young gust
#

Not in the inventory sql files

drowsy briar
#

wait for the creator to check maybe? 4838sadge

young gust
#

yes

lapis lagoon
# young gust

Downloaded wrong release, if you hit release on right hand side of github it will have 2 versions, and apartments for ox will work correctly if you implement it exactly as instructed others have gotten it with no questions based on reactions and replies

indigo roost
#

^

urban sequoia
#

#💬︱support

terse thicket
lapis lagoon
terse thicket
#

Okay thanks!

noble kite
#

is there a 6th slot?

worn socket
#

Works amazing. Wish for a "locked" 6th slot yeah. And the option to change the inventory colors... Cant find a .css file 😦

undone rover
worn socket
undone rover
#

People moved on from that

#

Cuz itt doesnt make sense

#

especially if police can access it

#

Yea let me put a whole ass AR up my ass so u cant steal it

worn socket
#

You see imagine a whole thousand of black money bags up my * * * * LOL

undone rover
#

Yes, if u have that on u

#

u must be carefull

#

thats what rp is

#

u are robbable

worn socket
#

YOu know what would be a cool script, this is beyond this topic. But it can be done. If you are a Police Officer, when you target a player, or any NPC for that matter, it pops up a info above their head stating : Possible chance of carrying illegal gun license, 20% chance of illegal money on hand, 45% chance of drugs

Just a random thought

frosty hull
#

That would be power gamed to hell and back. Cops would just search you cus they see a 10% suspicion on the top of someones head

worn socket
#

Idk - just some information. But yeah you right...

drowsy briar
#

not roleplay

worn socket
#

May I ask why this error now?

drowsy briar
worn socket
#

Yeah, I mean it was working then all of a sudden not.

drowsy briar
worn socket
#

But its okay, Ill try it again later, had to redo my whooooole Server so I managed to save my edits on some scripts. And replace some

Yeah I started the scripts in exact order...

drowsy briar
#

start qb-core and ox_lib first

#

ensure qb-core
ensure ox_lib

ensure ...
...

young gust
#

i need help

opal plinth
young gust
#

how do I do it?

dense vector
plucky token
#

how to make qb-drugs work with this ? i can't open the shop

rapid cloak
carmine crane
carmine crane
indigo roost
manic patrol
tall pewter
#

Such as servers that have players create back stories

terse thicket
lapis lagoon
terse thicket
#

dont worry 😄

terse thicket
undone rover
terse thicket
#

does that support ox_inv?

undone rover
#

Ofc lol

livid remnant
#

Do you know where I can change the color of the inventory and the number of slots.

queen wagon
#

Slots Javascripts and Colors in the Css?

livid remnant
queen wagon
# livid remnant I can't find it in those files

Oww i see it's OX 😅 I thought it was PS . if its Ox i think you need to use Vite if i remember it right. Dont know if you have any experience with vite or react or if i say NPM.
its using Typescript

livid remnant
worn smelt
#

@queen wagon
Would you have a demo for editing ox_inventory with Vite? i would like to learn

analog sapphire
vagrant moon
#

Noice

queen wagon
indigo roost
wet pawn
#

anyone know ox_inventory how to more stash items in qbcore inventory datebase format into ox format

indigo roost
#

Not the place to ask

modest tangle
#

Damn very nice job! Huge kudos to you!

indigo roost
pastel sphinx
real zephyr
#

Where can i change this green color? Plz tag me when you know 🙂

thorny zenith
carmine crane
carmine crane
real zephyr
dense vector
carmine crane
#

Idk how it works in ox inv

carmine crane
dense vector
#

ox_inventory\web\src\components\utils WeightBar.tsx

glossy charm
#

How about no? Do it yourself.

native crest
dawn crane
#

how to get qb apartment stashes to open up?