I've decided to some fun activities with my free time to make some fun addons for Garry's Mod, roleplay.
The addon I'm trying to make is allowing specific doors to be rentable, then when someone rents that door, the main owner will receive periodical payments!
I am having some issues with the table not being accessible though.
-- door is a meta function, a property to all entities.-- in this case it belongs to doors.
There's just one issue. when i want to add a few sub doors, the 'SubDoors' table only prints 1 index. Am I overriding something here?
Feel free to ask any questions what you aren't sure about!
Thanks!
OfficialCeeOfficialCee
1 Answer
The problem is in the line
There you have two levels of braces which makes this expression equivalent to
How To Access Gmod Lua In Addons 1
that is a table of tables with one entry. Just strip the outer pair of parentheses and you should be fine, i.e.
Henri MenkeHenri Menke
7,60511 gold badge1414 silver badges3131 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged luagarrys-mod or ask your own question.
I have recently been building my GMOD server and is slowy getting popular but I was interested to create a addon so I put together something that, should, download some worksop links in loading screen and others ingame. This is what I have created.
sv_auto_download:
Vosem MediaVosem Media
1 Answer
No, this will not work.Firstly,
PlayerInitalSpawn runs after the loading screen and also resource.addworkshop is a server side function that is loaded once so that the server knows to load the workshop files, meaning addons will still be downloaded in the loading screen anyhow.
You can not 'download some worksop links in loading screen and others ingame' and you should not force players to download 10gigs of models if they don't want to.
The best way to get players to download addons is through the workshop.
Then, players will automatically download server content and it is easy for you to add more addons, with it also serving as a way for players to quickly download large models permanently if they wish to play on your server for an extended period of time.
By the way, you forgot to include the function delegate into the
hook.Add :
hook.Add ( 'PlayerInitialSpawn', 'DownloadFiles', DownloadFiles )
holmrekRholmrekR
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Not the answer you're looking for? Browse other questions tagged luagarrys-mod or ask your own question.
ULX is an admin mod for Garry's Mod.
ULX offers server admins an AMXX-style support. It allows multiple admins with different access levels on the same server.It features commands from basic kick, ban, and slay to fancier commands such as blind, freeze, voting, and more.
Visit our homepage at http://ulyssesmod.net.
You can talk to us on our forums at http://forums.ulyssesmod.net.
Requirements
ULX requires the latest version of ULib to be installed on the server.
InstallationWorkshop
ULX's workshop ID is
557962280 . You can subscribe to ULX via Workshop here.Don't forget you'll also need ULib, whose workshop ID is 557962238 and can be found here.
Classic
To install ULX, simply extract the files from the downloaded archive to your garrysmod/addons/ folder.When you've done this, you should have a file structure like this:
(garrysmod)/addons/ulx/lua/ulib/modules/ulx_init.lua
(garrysmod)/addons/ulx/lua/ulx/modules/fun.lua Comment installer floris mod pack.
You absolutely, positively have to do a full server restart after installing the files. A simple map change will not cut it!
Usage
To give yourself a jump start into ULX, simply remember the commands
ulx help and ulx menu .
To access the commands and settings in ULX, you can open the GUI with
ulx menu in console. It is recommended to bind this command to a keyboard key. Additionally, you can use console commands in the form of ulx (command) (arguments) or chat commands in the form of !(command) (arguments) .
To add users to usergroups, navigate to the 'Groups' tab of the GUI and select a group. Then use the 'Add' button to add connected players. You can also use the
ulx adduser (user) (group) command. If you absolutely need to, you can also edit the data/lib/users.txt file.
A word about superadmins: Superadmins are considered the highest usergroup. They have access to all the commands in ULX, the ability to override other user's immunity, and are shown log messages which are hidden from other players (EG, they are shown rcon commands admins are running). Superadmins also have the power to give and revoke access to commands using userallow and userdeny.
All commands are preceded by
ulx . Type ulx help in a console without the quotes for help.
Check out the config folder in ulx for some more goodies.
Credits
ULX is brought to you by.
A big thanks to JamminR for listening to the rest of the team (especially Megiddo) ramble on, never giving up on us, and for giving the project fresh insights.
Changelog
See the CHANGELOG file for information regarding changes between releases.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |