I really dont get how to add items to the inventory...
Simple. what you do is spawn the prop of a health kit, then press the E button near to it. And it adds itself to the inventory.
Ok have a few questions.... I am currently using the old version of inventory addon as I understand how to add functions to that version... Do I just add the same functions in the same format onto the end of the NewItem:"etc..." ?!?
Like this:
[code]
InventoryAddon:NewItem( "AK47",
"A basic assault weapon",
"models/weapons/w_rif_ak47.mdl", true true,
function ITEM:USE( ply )
if ply:GetWeapon("weapon_real_cs_ak47") then
ply:GiveAmmo(100,"smg");
Inventory:SendMessage( "You already have an AK47", ply, false )
else
ply:Give("weapon_real_cs_ak47");
Inventory:SendMessage( "You have been given an AK47, ply, false )[/code]
Also if anyone was willing to share the code for CSS weapons already done for the new inventory addon I would be very gratefull as am trying to fully intergrate it with my DarkRP server...!
Thanks in advance! :D
Edit: Also I have a problem with the old version with the shipments in DarkRP. When I use the shipments to create a weapon the created weapon can't be placed in my inventory... Any idea how to fix this?!?
This is amazing i cant believe its here!
Greatest Thing ever.
(on a side note)
Domcop He would answer your question but he was banned for some reason.
[QUOTE=omomo0725;17012610]Domcop He would answer your question but he was banned for some reason.[/QUOTE]
What?!? Now how the hell am I meant to get this working?!? Why was he banned!?! ;(
Can anyone else help me here?!? Would be much appreciated as I am currently without an inventory on my server :(
Why was he banned? I don't understand the "Breaking rules on an alt" reason, what does that mean?
Meh, maybe he meant that he continued doing it using his alt?
...OR maybe he is planning World War 3 on his alt, trying to get us to do it with hypnotism on a computer screen...
We may never know the truth
[quote=gameadict;17026676]meh, maybe he meant that he continued doing it using his alt?
...or maybe he is planning world war 3 on his alt, trying to get us to do it with hypnotism on a computer screen...
We may never know the truth[/quote]
what does alt mean
[QUOTE=TheCloak;17030796]what does alt mean[/QUOTE]
Alternate.... It is refering to an alternate account...... :D
And if anyone would like to help code for my server I would be more than grateful starting with inventory addon :D
He either rushed it, or fucked it up in so many ways it just isnt funny. My first complaint is adding items NOW is a bitch! no really it IS A BITCH, items with complex functions cant be made anymore, Like the bonk energy drink or ammo kits i made, None of these work in this stupid InventoryAdd stuff at the bottom of ai_shared, On a second note, why would i be getting an error, on a UNMODIFIED IA_cl_init?
IA_cl_init.lua:51: attempt to index global 'InventoryAddon' (a nil value)
Its just the window title... Why in the world?!?!
To be honest, i think he just broke his own addon...
Sadly as for my DarkRP server I desperatly need some form of inventory that saves!!!
Until this is fixed then you can forget the idea sadly.
[QUOTE=Domcop;17051788]Sadly as for my DarkRP server I desperatly need some form of inventory that saves!!![/QUOTE]
Ehh, what do you want to save? The shipment crates and stick them in your inventory? I don't believe that can be done.
[QUOTE=Domcop;17051788]Sadly as for my DarkRP server I desperatly need some form of inventory that saves!!![/QUOTE]
Have you tried porting the pocket swep from 2.3.5? (I think that's the release)
[QUOTE=Zero Cucumber;17052717]Ehh, what do you want to save? The shipment crates and stick them in your inventory? I don't believe that can be done.[/QUOTE]
I am not sure if it can be done with the crates themselves.... But it can, if/when the addon is working, be done with individual weapons and things like food or drugs etc...
[QUOTE=Teh_Medic;17054323]Have you tried porting the pocket swep from 2.3.5? (I think that's the release)[/QUOTE]
I already have the pocket swep on my server however it does not save the items after someone disconects and it also does not have a very good gui....
[QUOTE=Wizey!;17052451]Until this is fixed then you can forget the idea sadly.[/QUOTE]
Im still using the old version for my gamemode,i like the v2 interface,but adding items is more difficult now.
Maybe he did it so roleplayers can spawn theyr items withouth an admin,but,on custom gamemode that won't work :|
Which gamemode are you running?!?
[QUOTE=Domcop;17066362]Which gamemode are you running?!?[/QUOTE]
Most likely a gamemode such as mine where the Q menu is disabled.
[QUOTE=Jvs;17061512]Im still using the old version for my gamemode,i like the v2 interface,but adding items is more difficult now.
Maybe he did it so roleplayers can spawn theyr items withouth an admin,but,on custom gamemode that won't work :|[/QUOTE]
Exactly, Adding items with PURPOSE is no longer possible. I used to be able to make great stuff, Bonk energy drink that Acted like the real thing, Speed with god mode, then slow and ungod simple... yes? NO!! Not anymore with the new "add" system. so im with JVs on this.
[QUOTE=Wizey!;17071123]Exactly, Adding items with PURPOSE is no longer possible. I used to be able to make great stuff, Bonk energy drink that Acted like the real thing, Speed with god mode, then slow and ungod simple... yes? NO!! Not anymore with the new "add" system. so im with JVs on this.[/QUOTE]
what.
The new add function works just fine. You can still make all that shit, it's just inside a function instead of a table this time.
[QUOTE=Wizey!;17071123]Exactly, Adding items with PURPOSE is no longer possible. I used to be able to make great stuff, Bonk energy drink that Acted like the real thing, Speed with god mode, then slow and ungod simple... yes? NO!! Not anymore with the new "add" system. so im with JVs on this.[/QUOTE]
I fail to see why. What can't you do with this system that you could do before?
So, Any updates as of yet?
ok ok ok ill try and show you...
you CANNOT implement this with the new one
[code] ply:EmitSound( "vo/scout_invincible03.wav" )
ply:EmitSound( "player/pl_scout_dodge_can_open.wav" )
ply:SetHealth( 150 )
ply:SetWalkSpeed( 470 )
ply:SetRunSpeed( 470 )
ply:GodEnable()
timer.Create( "my_timer", 10, 1, function()
ply:SetHealth( 150 )
ply:SetWalkSpeed( 140 )
ply:SetRunSpeed( 140 )
ply:EmitSound( "player/pl_scout_dodge_tired.wav" )
ply:EmitSound( "player/pl_scout_dodge_tired.wav" )
ply:EmitSound( "player/pl_scout_dodge_tired.wav" )
ply:GodDisable()
end )
timer.Create( "my_timer2", 14, 1, function()
ply:SetHealth( 149 )
end )
end
end[/code]
OR THIS!
[code] ply:GiveAmmo(75,"smg1")
ply:GiveAmmo(75,"ar2")
ply:GiveAmmo(25,"buckshot")
ply:GiveAmmo(15,"357")
ply:GiveAmmo(200,"pistol")
ply:GiveAmmo(20,"xbowbolt")
end
end[/code]
Ive adapted it, chenged the amount of ends done what it said the errors where, tweaked it over and over, nothing seem to work, i find the old Items folder with luas IN that folder to work better. Theres your reason.
[QUOTE=Wizey!;17122037]ok ok ok ill try and show you...
Ive adapted it, chenged the amount of ends done what it said the errors where, tweaked it over and over, nothing seem to work, i find the old Items folder with luas IN that folder to work better. Theres your reason.[/QUOTE]
The folder with the lua items makes it more "modular",it's easy to script a new item and put it in the items folder,because i can reload the item list in realtime,but i can't with all the items on a single lua file.
So... the old version is still better.
[QUOTE=Wizey!;17122037]ok ok ok ill try and show you...
you CANNOT implement this with the new one
Ive adapted it, chenged the amount of ends done what it said the errors where, tweaked it over and over, nothing seem to work, i find the old Items folder with luas IN that folder to work better. Theres your reason.[/QUOTE]
That's because those aren't valid Lua.
Please post an entire item file (the bonk one will do) and I will adapt your code to fit.
Im still with Jvs, he seems to understand where im coming from, and no need for me to post it, theres still going to be single line adaptions and ends required with )'s on the end, it shouldnt need to be "Adapted" by you to work, it should just work from the original version. Again Jvs understands me :D
[QUOTE=Wizey!;17127679]Im still with Jvs, he seems to understand where im coming from, and no need for me to post it, theres still going to be single line adaptions and ends required with )'s on the end, it shouldnt need to be "Adapted" by you to work, it should just work from the original version. Again Jvs understands me :D[/QUOTE]
[lua]
local function myolditemfunction(player)
--[[
LOOKIT THIS IS MY OLD ITEM,
IT DOES SHIT LIKE SET THE PLAYER'S HP N AMMOS
--]]
end
InventoryAddon:NewItem( "My Item", "GEIF U HPS AN AMMOS AT ONCE", "models/Items/healthkit.mdl", true, true, "ambient/voices/cough4.wav", myolditemfunction )[/lua]
Seriously, how hard was that?
If you would care to post your item, I will make a bit of code that not only will not involve any single line adaptations, but [i]actually let you use the old system while using the new one[/i]. :aaaaa:
requires 2 ends to work, since its using 2 hooks, adding and giving, Adding the item to the addon "in the old version and giving the ammo wich required a new hook, and i didnt post a smiley face... So wtf is that about? :3:
[QUOTE=Wizey!;17146170]requires 2 ends to work, since its using 2 hooks, adding and giving, Adding the item to the addon "in the old version and giving the ammo wich required a new hook, and i didnt post a smiley face... So wtf is that about? :3:[/QUOTE]
Since when does one function need two ends.
[editline]08:19PM[/editline]
wait what.
[editline]08:19PM[/editline]
jesus christ at least attempt to make sense.
[editline]08:27PM[/editline]
it works just fine what the hell are you on about.
Sorry, you need to Log In to post a reply to this thread.