What's different in v2. Also I see it no longer has an items folder? Do you have to add everything into the "IA_shared.lua" now?
Hmmmmm..............This is gay............. can someone PLZ copy and paste those words about how to make the items? bc i cant see it!
[editline]10:02PM[/editline]
because i want to know how to spawn the items and use them........I CANT SEE THOSE WORDS AT THE TOP! ANY OF THEM!
Alright. Im using this code as it is.
-- Register the item so it exists in the main stuff.
InventoryAddon:RegisterItem( ITEM )
-- This particular items table, must have it.
local ITEM = { }
-- The UniqueID for this item, this is used to spawn the item and it's the ID for the item. Text always has to be lowered.
ITEM.UniqueID = "ammopack_large"
-- The model that will be shown in the inventory and on the map.
ITEM.Model = "models/Items/ammopack_large.mdl"
-- The name for this item, used in the inventory menu.
ITEM.Name = "Largeammopack"
-- The description for this item, used in the inventory menu.
ITEM.Description = "A reusable ammo box that refills health and ammo entirely. But not armor till that is figured out."
-- Remove this item from the inventory when you press use on it?
-- True will make it remove, false will make it stay.
ITEM.RemoveOnUse = false
-- The USE item function.
if ( SERVER ) then -- Only used on server so use this check.
function ITEM:USE( ply )
ply:SetHealth( ply:Health() + 1000 )
ply:GiveAmmo(9999,"smg1")
ply:GiveAmmo(9999,"ar2")
ply:GiveAmmo(9999,"buckshot")
ply:GiveAmmo(9999,"357")
ply:GiveAmmo(9999,"pistol")
ply:GiveAmmo(9999,"xbowbolt")
InventoryAddon:SendMessage( "Restored! Now kick their bottoms!", ply, false )
end
end
-- Register the item so it exists in the main stuff.
InventoryAddon:NewItem( ITEM.Name, ITEM.Description, ITEM.Model, ITEM.RemoveOnUse, true, nil, function(ply) ITEM:Use(ply) end )
Now since im using 2.0 Do i put it in the Data folder or what?
And test this. See ifit works.
If not. can ya post this as a working item?
[QUOTE=Xemgoa;18118573]Alright. Im using this code as it is.
-code-
Now since im using 2.0 Do i put it in the Data folder or what?
And test this. See ifit works.
If not. can ya post this as a working item?[/QUOTE]
U need to add it IA_shared.lua u cant use the old way more.
[QUOTE=Trivkz;18118682]U need to add it IA_shared.lua u cant use the old way more.[/QUOTE]
Alright. can ya fix the cold into a acceptable one? My head hurts and im sick xD
...no seriously i cant think V_v;
More over. Whats the Lua coding for Battery?
So i may use to use it in this lua code for replenishing Armor?
How can I use this with DarkRp?
It has been a while since I have looked at this! But from memory I believe you need to create a file with all the items that you want to work with it then just use it as a regular add-on! (I think! :D)
[QUOTE=Domcop;18132457]It has been a while since I have looked at this! But from memory I believe you need to create a file with all the items that you want to work with it then just use it as a regular add-on! (I think! :D)[/QUOTE]
What the fuck?
[QUOTE=Chewgum.;18062019]Hi again, here you go if you still want it:
[url=http://www.garrysmod.org/downloads/?a=view&id=82203][img]http://www.garrysmod.org/img/?t=dll&id=82203[/img][/url]
I'll just not get my ass banned this time lol.[/QUOTE]
Yay! But do you have the DarkRP version as well? :X
If you mean the menu addition, here, just replace the files in ur darkrp.
[url=http://www.garrysmod.org/downloads/?a=view&id=82594][img]http://www.garrysmod.org/img/?t=dll&id=82594[/img][/url]
[QUOTE=Chewgum.;18144960]If you mean the menu addition, here, just replace the files in ur darkrp.
[url=http://www.garrysmod.org/downloads/?a=view&id=82594][img]http://www.garrysmod.org/img/?t=dll&id=82594[/img][/url][/QUOTE]
I cant thank you enough!
[QUOTE=Helix Alioth;17391765]Anything can be done.[/QUOTE]
I second this notion.
How do I pick things up?
I just can't work it out.
[QUOTE=hoot14uk;18258799]How do I pick things up?
I just can't work it out.[/QUOTE]
u can only pick up special coded things up, and to that u use "E"
[QUOTE=Trivkz;18260521]u can only pick up special coded things up, and to that u use "E"[/QUOTE]
Or what ever button you have binded to '+use'
I was wondering if anyone could help me. I have added weapons the the item list however when I get near to the guns they are instantly equipped. How can I make them go to my inventory and equip them from there? Thanks
This is great, but the DarkRP version isn't working for me. I keep getting this error:
DarkRP\gamemode\showteamtabs.lua:551: bad argument #1 to 'pairs' (table expected, got nil)
Help?
Sorry, you need to Log In to post a reply to this thread.