Thanks for the response! We have that already setup, but I want to make it so that if a criminal were to pick up the gun, they could not physically use the weapon without the police job.
Hello, how can i integrate or allow a auto-reload feature, because I need to click “R” to reload every time i shoot a whole magazine out?
any ideas how to make food items has durability , how to make the food last 2-3 days and then spoil?
or general make some items not last for ever ?
use degrade
so if i do this :
["cheeseburger"] = {
label = "CheeseBurger",
weight = 1000,
degrade = time in mins,
decay = true,
stack = true,
close = true,
},
is this correct ?
['cheeseburger'] = {
label = 'Cheese Burger',
weight = 220,
degrade = 60,
stack = true,
close = true,
client = {
status = { hunger = 200000 },
anim = 'eating',
prop = 'burger',
usetime = 2500,
notification = 'You ate a delicious burger'
},
},
Also keep in mind it’s in minutes. So if you want it to degrade after 3 days use:
degrade = 4320,
thank you all very much !!!
I am using Kyros V5 weapon pack and seem to get this when I try to use the attachments:
Nothing in console or F8
['at_clip_drum_pistol'] = {
label = '50 Round Drum',
type = 'magazine',
weight = 500,
client = {
component = {
`COMPONENT_GLOCK19X_CLIP_03`, -- v4
`COMPONENT_GLOCK19_CLIP_03`, -- v4
`COMPONENT_GLOCK40_CLIP_03`, -- v4
`COMPONENT_GLOCK40S_CLIP_03`, -- v4
`COMPONENT_GLOCK18C_CLIP_03`, -- v4
`COMPONENT_ILLGLOCK17_CLIP_03`, -- v5
`COMPONENT_BLUEGLOCKS_CLIP_03`, -- v5
`COMPONENT_GLOCKBEAMS_CLIP_03`, -- v5
`COMPONENT_MGGLOCK_CLIP_03`, -- v5
`COMPONENT_TGLOCK19_CLIP_03`, -- v5
`COMPONENT_MIDASGLOCK_CLIP_03`, -- v5
},
usetime = 2500
}
},
['at_clip_100_pistol'] = {
label = '100 Round Mag',
type = 'magazine',
weight = 800,
client = {
component = {
`COMPONENT_GLOCK19X_CLIP_04`, -- v4
`COMPONENT_GLOCK40_CLIP_04`, -- v4
`COMPONENT_GLOCK40S_CLIP_04`, -- v4
`COMPONENT_ILLGLOCK17_CLIP_05`, -- v5
`COMPONENT_BLUEGLOCKS_CLIP_04`, -- v5
`COMPONENT_GLOCKBEAMS_CLIP_04`, -- v5
`COMPONENT_MGGLOCK_CLIP_04`, -- v5
`COMPONENT_TGLOCK19_CLIP_04`, -- v5
`COMPONENT_MIDASGLOCK_CLIP_04`, -- v5
},
usetime = 5500
}
},
['at_clip_clear'] = {
label = 'Clear Clip',
type = 'magazine',
weight = 280,
client = {
component = {
`COMPONENT_TANARP_CLIP_04`, -- rifle
`COMPONENT_LBTANARP_CLIP_04`, -- rifle
`COMPONENT_WOARP_CLIP_04`, -- rifle
`COMPONENT_ILLGLOCK17_CLIP_04`, -- pistol
`COMPONENT_BLUEGLOCKS_CLIP_05`, -- pistol
`COMPONENT_GLOCKBEAMS_CLIP_05`, -- pistol
`COMPONENT_MGGLOCK_CLIP_05`, -- pistol
`COMPONENT_TGLOCK19_CLIP_05`, -- pistol
`COMPONENT_MIDASGLOCK_CLIP_05`, -- pistol
`COMPONENT_REDARP_CLIP_04`, -- rifle
},
usetime = 2500
}
},
i am trying to add a lockpick to my server and make it use for 4-5 times and then you have to buy a new , end when i do this:
['lockpick'] = {
label = 'Lockpick',
weight = 1000,
stack = true,
consume = 0.2,
decay = true,
},
item is not usable , if i remove consume it is useable … any thoughts ?
Does anyone have the inventory compatible with nat2k15?
Whats that ?
I have an idea but cant figure it out how to do that.
If i drink a water, the water gets removed from my inventory, but i like to get an empty bottle for it.
I read through the whole topic and the only sample that is given didnt work for me. Any solutions?
EDIT: formating was wrong, now it works
Item('water', function(event, item, inventory, data, slot)
if event == 'usedItem' then
Inventory.AddItem(inventory, 'water_bottle', 1)
end
end)
ox_inventory/modules/items/server.lua
so you know how to add a new usable item with this ox inventory ?
can you give me an example please ? whitch file should i edit ?
i want to add a lockpick
thanks anyway
Take a look at the documentation on creating items. Just go to ox_inventory > data > items.lua and add an item following the format of the pre-existing items. I believe the lockpick already exists as an item.
ox_inventory\data\items
['lockpick'] = {
label = 'Lockpick',
weight = 160,
allowArmed = true,
},
you also need a icn, put that in ox_inventory\web\images
rename to “lockpick.png”
is there a way to skip this ? i die from hanger and after i revive my self i cant eat , so i die again and again…
Is there a way to clear inventory when player leaves tge server?
Where can the weight be changed? I can’t find it.
es_extended/config.lua
line 42
Config.MaxWeight = 35 ← means 35kg