Thanks to @outer coral for the np 4.0 redesign of ps-inventory I've been working on something for my zombie server, where each weapon can have multiple different rarities, so for example the 1 item of weapon_pistol can have any rarity Common | Uncommon | Rare | Legendary | Exotic these rarities are stored as metadata for the item. Then in the inventory side, in the javascript, I have it so it adds a radial gradient around the item depending on the rarity.
#ps-inventory weapon rarities
123 messages · Page 1 of 1 (latest)
This looks pretty damn good, This looks like its gonna bring that dying light feeling to FiveM in a unique way. I haven't really seen much zombie servers so I'm not sure but to me it looks pretty unique
I appreciate it! this is my first attempt at doing anything as far as writing code in javascript, it took me all day to figure it out lol. The only issue I'm having which isn't a big deal, is when you move the weapon to another slot, the background gets removed until you re-open your inventory.
Also you can ignore the fact that the word Backpack is underneath my inventory slots, this inventory doesn't play nice with ultrawide screens appearantly lol
Believe it or not, I've never played dying light lol
Dude dying light is so good, You've kinda nailed what they did in dying light 2 cause they had weapon rarities and they color coded them the same way you did. So I thought that was pretty cool to see
lmao. Honestly, I couldn't think of any other colors, besides what Fortnite does lmao.
But I mean we have Base building, crafting, looting, and I'm currently working on V2 where we're going to do a mix between PvP and RP.
So there will be a zone within the city that allows players to go into and it straight KOS anything outside of that is RP, we're gonna have jobs like the Militia(something like RP cities PD), Medics, Mechanics, ownable Pawnshops, ownable shops. I've got some big plans, just slowly getting there lol
I added an Infection Line to the player body image cause I've also got a system in place in V2 where you get a chance of getting infected when you get hit by a zombie
Yeah that sounds fire, I tried doing that myself once but that server never really worked out :D. Hopefully you get it working i'm pretty curious to see what you'd make as an infection system. I'll for sure have to come check it out!
I hear that, I've been workin hard on my own server and it really does take time to get things done. Just keep up the good work and try your best, Everyone learns with experience and with time. Even if it takes a while to get some of your ideas out you should be good. Your ideas seem pretty good so far
Ill shoot you a link to the discord, V1 that is live, is completely different from that V2 will be lol
bet send me a fr if you want too
Well I've been doing this for going on 3 years now, I've got coding down pretty decently, but html/css/js I'm still trying to learn lol.
And I'm scared to learn any of the building of the UI for ox_lib or ox_inventory lol
you can fix that by changing backround color in js
Yea that's what I've done. I used radial-gradient for the background
Looks really goor in working on v2 off zombie server this would look sick. Do you use multiple weapons items for rarerity or something else?
I'm actually working on my V2 and in V1 I have it setup as each weapon has their own varity item, but this version, I'm making it so like weapon_pistol(1 item) can be all different varities, it's all in the Metadata of the item. and when your looting a zombie, if it gives a weapon, itll give a random rarity, can even be damaged, and even come with ammo and attachments already on it
That is super dope. Does of als have different damage or something?
For everything other than melee yes, for everything including melee, it also increases durability
i make it to check weapon_ how you did for single item ?
Hey, does that inventory show all pockets when get robbed?
Could you test it?
RegisterCommand('touchme', function()
local ped = PlayerPedId()
QBCore.Functions.Progressbar("robbingme", "Touching myself...", 1000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", GetPlayerServerId(ped))
end)
end, false)
thats dope can i follow the progress somewhere?
yes but not sure 100%
I don't have it on githib or anything so I can't exactly show progress of it as I'm pretty done with the code.
I replied back to this I though but it's gine
are you gonna release it in this discord?
Im waiting for it to see if im gonna dump my Core Inventory for it haha
https://cssgradient.io/ use for better radial color
Idk, maybe in the future but not right now
background: radial-gradient(circle, rgba(0,255,149,0.4206057422969187) 0%, rgba(255,245,0,0) 0%, rgba(244,255,1,0.3596383426966292) 53%, rgba(255,245,0,0.7880091292134832) 100%);
```this what i use
I have a loot script that can add a random Metadata and then in the Javascript under inventory.open there's a for loop that goes through each slot and I did an if statement to check for the rarities and then add a css styling for that slot
that looks clean
That's what I did or something like that but I used variables. I can dm you the code in a bit
What do you mean?
i also add shine to it
.item-colorsss {
position: relative;
overflow: hidden;
background: radial-gradient(circle, rgba(0,255,149,0.4206057422969187) 0%, rgba(255,245,0,0) 0%, rgba(244,255,1,0.3596383426966292) 53%, rgba(255,245,0,0.7880091292134832) 100%)!important;
}
.item-colorsss::after {
content: '';
position: absolute;
top: 0;
left: -200%;
width: 200%;
height: 100%;
background: rgba(255, 255, 255, 0.349);
animation: linear-shine 1s linear infinite; /* Linear shine animation */
}
@keyframes linear-shine {
0% {
left: -200%;
}
20% {
left: -150%;
}
50% {
left: -100%;
}
100% {
left: 100%;
}
}```
That's pretty cool, I just wanted my simplistic lol I wanted the color to look like it was coming out from behind the item image
i tough you said that you made a V1 and now working on a V2
i will share small video
My server. Not the script
Alright
I think that would look cool as a hover animation lol
yeah you can do that
You using ox or ps?
ps
I got some plans I wanna do eith it. Like tie the backpack slots to clothing. So you only get the extra slots if your wearing a backpack
thats nice idea
that looks sick @oblique phoenix is this the inventory from your git?
i use era-outfits
Right. I figure it's gonna take alot of coding but I'm sure it's doable.
As your appearance script? I use illenium appearance
not it make clothing like item i am also using illenium
Oh is it a free script? Cause I've been looking for one of those
yeah
Bet!
Thank you lol was just about to ask if you had a link
i am using it for so long only issue i have with comnt its working only with radialmenu
What do you mean
Hmm that's strange
its because its only setup for radial menu
I'll have to look at that but I'm at work atm so it'll be this afternoon
👍
not working sadge
I'm gonna have to message you what the message said cause it wouldn't let me send it lol
rarity using wow/diablo concept
@outer coral I have all the slots working so when you add items to your inventory it uses all the slots, except the backpack, I'm still working on it
does rarity work by default in ps-inventory or only the nopixel 4.0 one im so confused
Nope.
can you please explain me how the rarity works is it metadata based or something extra added tot the shared/items.lua?
shared/items.lua This one and javascript (inventory)
🥳 🔥 🙏
do you have some info on how to set it up?
You can give any item anytime of Metadata you want but to setup what I've got you gotta adjust the inventory alot
Thats up to you but I've been workin on an inventory 2.0 cause I made a lot of errors the first time around that I wanna fix
Lol alright I'll send it your way when I get home from work.
The issue was the for i = loops in the Javascript causing the slot numbers to be random. But the way I did it is your able to adjust the Config.MaxInventorySlots to whatever you desire and are still able to to keep all slots working.
I then added a Config.Backpacks that gets the backpack component id's and gives a configurable amount of slots for that component. Could probably even set it up so if the player doesn't have pants then remove x amount of slots from the player pockets lol
Damn alright! Yeah another dev who worked on his own qb-inventory edit has it so some slots are actually reserved for like the phone, cash, etc, So I'm sure that that anything is possible with the inventory it just takes time and work. I am glad to see the progress you're makin with the inventory!
It keeps reminding me more and more of dying light
That's not a bad idea honestly lol
could it be possible to select the amount of slots for "otherinventory" and which slots to select?
i beg for this to get released
I haven't been able to test which slots are robble and not robable on mine since I've fixed the slot numbers on mine. No one's been around for me to test it lol
https://github.com/iONDegen/ps-inventory
Here is iONs version, that I've built upon and worked on, I might release my version in the future, but right now it's been custom built for my zombie server so I would have to copy it and remove my customizations.
Does this have the rarities on it ?
It does not, that's part of my code that I've made for my zombie server.
ahh ok ill have to wait and see if your going to release that
Can you rob players etc with this?
There was a push made .. just adds 150 slots to the otherplay and with that if you put an item in the wrong slot, then the player won't see that item until someone puts it in the corect slot
RegisterCommand('touchme', function()
local ped = PlayerPedId()
QBCore.Functions.Progressbar("robbingme", "Touching myself...", 1000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", GetPlayerServerId(ped))
end)
end, false)
Can use this command to test it maybe you can find a work around
Hehe fun too see that he used my visual items on ground drop for lj-inventory 😄 fun too see stuff getting used
I actually just got done working on and testing this lastnight lol.
I fixed that issue with mine lastnight
It's awesome lol. I love the idea of it.
There's so much different potiental with this inventory.
Do you ever get the issue where some items glitch out and you can’t select them ?
This seems to be the issue I’m getting or you have to go right up in to the corner and then it allows you to drag them
I haven't noticed and issue no
Hmm ok then seems to just glitch a little that’s all
When your trying to move items
this bottom one on the right by the foot when you hover over it nothing happens
I’ll teach 10individuals to earn $30k more within 72 hours but you will pay me 10% of your profit when you receive it. Note only interested people should apply, drop a message let's get started by asking (HOW)
I don't have that problem all my slots work as intended
Hmm I don’t get why I did nothing to the code it’s just what’s from git hub
what back pack script do you use ?
I dont have one