Garry's Mod

Garry's Mod

VendR - Customizable Vending Machines
51 条留言
tewg 2024 年 12 月 15 日 下午 12:19 
Nvm, figured it out.

Heres the code if anyone wants it too.


itemList = {
"weapon_crowbar",
"weapon_pistol"
}

VSHARE.item.ClassID = itemList[math.random(1, #itemList)]
return
tewg 2024 年 12 月 15 日 下午 12:10 
Is there any way i could make it drop a random item instead of a pre-determined one?
salter 2021 年 8 月 29 日 上午 10:15 
when i press buy, nothing happens, and i get this error

buying item 1 in category 1

[VendR - Customizable Vending Machines] lua/entities/ser_vender/init.lua:154: attempt to index a nil value
1. CreateWeapon - lua/entities/ser_vender/init.lua:154
2. func - lua/entities/ser_vender/init.lua:120
3. unknown - lua/includes/extensions/net.lua:32
Xirtlem 2021 年 5 月 27 日 上午 10:03 
anyone know how to change it to work with things like say, zombie survival money? im not at all a coder but would love to know what i do if possible.
Dave_Sherk 2021 年 1 月 25 日 下午 12:35 
How to configure what type of value it takes? I'm using Sandbox Money mod type
Bob 2019 年 8 月 25 日 下午 3:00 
when i press buy it takes my money
urethrat 2019 年 8 月 23 日 上午 8:25 
can you make this for a none dedicated (think thats the right word)
officereso 2019 年 6 月 24 日 下午 4:34 
how do i make the entities produces by the machine able to be picked up by the gravity gun.
hyperjll 2019 年 3 月 30 日 下午 7:30 
Please make a version for sandbox, this looks really fun. :(
Puw 2018 年 12 月 27 日 上午 7:09 
*played Borderlands 2 for more than 800 Hours* Hmm, Seems Familiar
Nihil 2018 年 9 月 3 日 上午 10:00 
Does This Addon Work's For The Sandbox Gamemode?
Sadist 2018 年 5 月 29 日 上午 10:31 
Please, make support PointShop (for use on SandBox) :)))
>KB> >KEKSQUAD 2018 年 3 月 23 日 下午 8:27 
[ERROR] lua/entities/ser_vender/shared.lua:366: attempt to index local 'v' (a nil value)
1. CreateValueEditor - lua/entities/ser_vender/shared.lua:366
2. LoadItems - lua/entities/ser_vender/shared.lua:235
3. OnRowSelected - lua/entities/ser_vender/shared.lua:488
4. OnClickLine - lua/vgui/dlistview.lua:422
5. unknown - lua/vgui/dlistview_line.lua:81

Happens whenever I make a new category.
>KB> >KEKSQUAD 2018 年 3 月 23 日 下午 7:55 
Hey, how would we go about using it with Vrondakis' levelling system? We only want certain items accessible to certain levels and ULX ranks.
SpiriT 2018 年 1 月 25 日 上午 7:24 
How to remove vending machine from the server?
Simone 2018 年 1 月 18 日 下午 5:23 
Thank you for dealing with the filthy masses.
DevonSFM 2018 年 1 月 5 日 下午 1:08 
thats a lot to read. ill just delete it cuz its to hard :)
Merc 2017 年 12 月 14 日 上午 9:14 
how to make it give weapons? too hard for me! make instruction
Turningyoucrispy 2017 年 11 月 25 日 下午 6:50 
how do you spawn it
Billward 2017 年 11 月 11 日 下午 3:07 
soooooooo what do you use as currency?

I make everything free but just curious
scarybarry14 2017 年 10 月 8 日 下午 7:43 
I get errors is there anything you need to get a texter pack for example to make it work
Soma 2017 年 8 月 19 日 上午 2:27 
This is a fantastic addon so far! thank you for your work on it! I do have a question though: How come I can't use the gravgun to pick up items that get dispensed from the vending machine?
Animawesome 2017 年 7 月 26 日 下午 7:20 
Hey how would you make this use pointshop points ? anyone know ?
-snip- 2017 年 7 月 16 日 上午 11:30 
I have a problem. If you walk out of the visible range of the screen, and then come back, you can't use it. Help please?
witch 2017 年 5 月 2 日 下午 3:12 
Does this work in sandbox?
Simone 2017 年 3 月 12 日 下午 5:26 
[ERROR] addons/vendr/lua/entities/ser_vender/shared.lua:367: attempt to index local 'v' (a nil value)
1. CreateValueEditor - addons/vendr/lua/entities/ser_vender/shared.lua:367
2. LoadItems - addons/vendr/lua/entities/ser_vender/shared.lua:236
3. OnRowSelected - addons/vendr/lua/entities/ser_vender/shared.lua:489
4. OnClickLine - lua/vgui/dlistview.lua:422
5. unknown - lua/vgui/dlistview_line.lua:81

This is another error. It happens if I'm editing the machine and already have persistence enabled; if I leave the editor, this error comes and everything is cleared.
Simone 2017 年 3 月 12 日 下午 5:26 
[ERROR] addons/vendr/lua/entities/ser_vender/init.lua:154: attempt to index a nil value
1. CreateWeapon - addons/vendr/lua/entities/ser_vender/init.lua:154
2. func - addons/vendr/lua/entities/ser_vender/init.lua:120
3. unknown - lua/includes/extensions/net.lua:32

I see where you addressed it earlier, saying that an item must be broken. This can't the case, though, because all of my items (including vanilla ones) create this error.
Dan Ween 2017 年 1 月 4 日 下午 6:20 
[VendR - Customizable Vending Machines] lua/entities/bullet/init.lua:18: attempt to compare nil with number
1. v - lua/entities/bullet/init.lua:18
2. unknown - lua/includes/modules/hook.lua:84

help please
i cant spawn anything
ataraxia 2016 年 12 月 10 日 上午 8:14 
Bugs

[VendR - Customizable Vending Machines] lua/entities/ser_vender/init.lua:127: attempt to call method 'CPPIGetOwner' (a nil value)
1. func - lua/entities/ser_vender/init.lua:127
2. unknown - lua/includes/extensions/net.lua:32

I get this everytime I exit out of the customization menu,
And once after that error all of my weapons except the first one I've created disappeared in my category, though it didnt happen again since and I cant make that happen again .

Suggestions
--If you close the customization menu all of the other input boxes (for typing weapon name etc.) should also close (if possible).
--Maybe add a cvar for changing the delay of the weapon coming out of the machine
--Make settings tab (during customization) refresh itself when enabling/disabling persisting or at least add some text to remind you to press settings.

Overall, this mod is freaking awesome and has a LOT of potential. Keep updating it and keep up the good work!

Liked+Favorited
Theon1yDoctor 2016 年 12 月 1 日 下午 5:13 
I can't type in a category name... need help plz
Theon1yDoctor 2016 年 11 月 25 日 下午 7:33 
I can't type in a category name... need help plz
smashguns 2016 年 11 月 21 日 下午 1:20 
when i spawn a entity how come i cant pick it up with my gav or phys gun?
moka 2016 年 11 月 18 日 下午 5:25 
How do you get money if you are using this for single player and you want to get cash for kills
CEPHY 2016 年 10 月 29 日 下午 7:42 
Forget that, apparently a bullet physics mod SOMEHOW thought your mod is going nuts...
CEPHY 2016 年 10 月 29 日 下午 6:45 
What the hell? My game is telling me that your addon is creating errors, BUT I DON'T EVEN HAVE IT INSTALLED?

I didn't even know that this exists! What is going on!
Seris  [作者] 2016 年 10 月 17 日 上午 10:20 
I already wrote an add-on that does that, but it's on my server only atm.
Seris  [作者] 2016 年 10 月 17 日 上午 9:57 
It works fine in sandbox with some tweaks. Use CLua to test if the player has the right amount of money. You could even make it take point shop points for all I care
Mumshroom 2016 年 10 月 17 日 上午 8:38 
Dude, this is meant for darkrp. You can just have a buildrp server.
Seris  [作者] 2016 年 10 月 16 日 上午 8:21 
Yes, though you will need to set it up in a specific way using CLua. Set the class I'd to prop_physics and then use a timer to set the model of the prop and reinitialize it's physics
Seris  [作者] 2016 年 10 月 13 日 上午 9:41 
I'm considering moving to using luapad as the CLua entry solution, but this will either require me to bundle it with the addon (i dont want to do this) or you will have to subscribe to luapad on your server. This is what my current test revision looks like right now: screenshot
Seris  [作者] 2016 年 10 月 9 日 上午 9:15 
One of your item entries is messed up, try again with a different item.
Tos 2016 年 10 月 9 日 上午 1:54 
[VendR - Customizable Vending Machines] lua/entities/ser_vender/init.lua:154: attempt to index a nil value
1. CreateWeapon - lua/entities/ser_vender/init.lua:154
2. func - lua/entities/ser_vender/init.lua:120
3. unknown - lua/includes/extensions/net.lua:32
Seris  [作者] 2016 年 10 月 6 日 上午 12:16 
And Revocity, this was originally intended to be sold on SF, but they kept denying the script for the same reason even after i fixed the error. I gave up and uploaded it here instead
Seris  [作者] 2016 年 10 月 6 日 上午 12:15 
If any of you were wondering how you can cheat the system a bit and copy vending machines without having to set them up all over again, simply set up a single vending machine how you want, then sync the changes, and move it to wherever you want more to be, change the name, and sync the changes. this will effectively duplicate the vending machine.
Yukami Nee-san 2016 年 10 月 5 日 上午 8:24 
Finally something that not with high af price on scriptfodder, nice job
Jorsan Seagull 2016 年 10 月 4 日 下午 2:35 
now that i know how to use it this addon is REALLY COOL
Jorsan Seagull 2016 年 10 月 4 日 下午 1:54 
ok
Seris  [作者] 2016 年 10 月 4 日 下午 1:53 
right click on an entity in the weapons or entities tab and click copy to clipboard
Jorsan Seagull 2016 年 10 月 4 日 下午 1:39 
how do you find the class name for stuff so you know what to put in the ClassID blank
Serial Designation N 2016 年 9 月 30 日 下午 6:56 
pretty great :D