Recent Posts

Pages: [1] 2 3 ... 10
1
Releases / Re: ULib SQLite Authentication
« Last post by MrPresident on Yesterday at 08:05:16 AM »
Updated the ucl.lua replacement file. I had left out a VERY important line of code... lol

Should be working 100% now.
2
Developers Corner / Re: Slash commands
« Last post by Jewson on July 19, 2018, 12:36:52 AM »
Ok daddy. :D
jk
I was just writing it when I was so tired.
3
Developers Corner / Re: Slash commands
« Last post by JamminR on July 18, 2018, 08:32:45 PM »
Welcome to Ulysses, welcome to ULib.
Please don't use language, even censored out, most parents wouldn't want a 6 year old hearing.
4
Developers Corner / Re: Slash commands
« Last post by Jewson on July 18, 2018, 08:21:43 PM »
Ok I found my mess up. I was inserting in this "ply:ConCommand( commandstring )", at the beginning a beginning of chat command not console command from the table. Now I changed that to insert a chat command and now it works.

Thank you anyway.

PS. To all of you out there. Remember to double check your code.
5
Developers Corner / Re: Slash commands
« Last post by iViscosity on July 18, 2018, 08:11:56 PM »
ULX doesn't give "Unknown command" messages unless actually doing "ulx <command>" in the console. Chat commands won't give that to you. Is that the full message that you are given or is there more?
6
Developers Corner / [SOLVED] Slash commands
« Last post by Jewson on July 18, 2018, 07:59:28 PM »
Hello,
I'm new to forum and new to ULX and ULib (code side ofc). And I'm coding RP gamemode. I decided to integrate ULX permissions into my gamemode to not make my own. I did my own chat command thing to recognize commands and execute them in console. And it works ( or worked ). It reacts to "/" commands and I did "/addmoney" and /setmoney and when I try to type them in I get this in console: "Unknown command: addmoney" and "Unknown command: setmoney". When I type for eg. "/ajhdajs" my system reacts but with two command mentioned earlier it doesn't work.

I think it is ULX causes that, because before I added ULX and ULib to my server/gamemode it worked perfectly.

Thanks to all of you who help me.
7
Releases / Re: ULib SQLite Authentication
« Last post by FunServer on July 18, 2018, 01:27:55 PM »
Thank you.
M8
8
Releases / ULib SQLite Authentication
« Last post by MrPresident on July 17, 2018, 04:26:10 PM »
What This Is
This is a replacement for ULib's UCL storage system. The current system saves and reads all stored users and their accesses from a single text file. This works fine, unless you a LOT of users, at which point you will start to experience some lag.

What This Does
This overrides the Save and Load functions in UCL. Instead of loading and saving your users to the users.txt file, it will instead load and save them from a SQLite database.


What This Doesn't Do
This only handles users. It doesn't store groups or group permissions. Those are still going to be stored in the groups.txt
This doesn't handle banning. Bans are already saved to the SQLite database by default in the newer versions of ULX.

What Is Modified
You will need to *replace* your ucl.lua file in addons\ULib\lua\ulib\server\ucl.lua
We typically NEVER recommend that you replace any of our stock files as this could cause issues or the changes will be reverted the next time you update ULib.. However, due to the nature of this kind of modification simply writing it into an addon wouldn't work because of the way modules are loaded. If you choose to install this, I HIGHLY recommend making a backup of your ULib addon first.
Inside the ucl.lua file I added some SQLite functions. I also modified the SaveFile function as well as completely commented out the LoadFromFile function. I also slightly modified addUser and removeUser functions.

How To Install
1. Download the copy of ucl.lua from this post (YOU NEED TO BE LOGGED IN TO SEE IT)
2. Replace Addons\ULib\lua\server\ucl.lua with the one I provided.
3. (optional) From your server console or in game (if you are a superadmin) run ulib_loadlegacy to load your users from your users.txt and load them into your database.

Upgrading from my MySQL module addon
If you decided you want to use the SQLite version instead of the MySQL version (because maybe you only have 1 server and don't need to access the data from outside of gmod) I've made it quite easy to import your existing MySQL users into this new SQLite system. Follow these directions EXACTLY:

1. BEFORE uninstalling the old module and installing this module, you will need to download the UCL MySQL to SQLite Backup file below.
2. Install it as an addon.
3. Launch your server and run the command: ulib_backupmysql
4. Verify that it wrote a file entitled: garrysmod/data/sql_ucl_backup.txt
5. Stop server and uninstall the addon you just installed. You won't need it anymore.
6. Download the latest version of ULib and overwrite the current version you have (This resets your ucl.lua file back to default)
7. Proceed to install this SQLite version as normal.
8. Once you've launched your server with the SQLite version installed, run the following command from the server to import your backed up users: ulib_loadfrommysql

WARNING/CAUTION
If you update ULib this modification will be lost and you'll have to reinstall it.
This comes as-is and while I did to testing, there is no way for me to know if it'll work in every situation. Please make a backup of your ULib files before installing this.

Help/Support
Post questions here, and I will do my best to help you. I've tested this with ULX/ULib version:
ULib v2.63d (05/12/18)
ULX v3.73d (05/20/18)

Please let me know how this works for you. :)
9
Additionally, though the actual releases may not work anymore, you might get more ideas from the bare code in releases/archived releases section.
There were 2 or 3 made to control usage of various weapons/items/functions/etc.
10
Developers Corner / Re: Custom Echo Text Colors
« Last post by JamminR on July 17, 2018, 03:58:33 PM »
Follow the function code.
Starts here - https://github.com/TeamUlysses/ulx/blob/c372f1a84fe86a5ecba21b16fcf73a4c78143eab/lua/ulx/log.lua#L455
Goes down, determines if it's the beginning of the line, sets default color, goes down, if it comes across a player, colors misc color.
Pages: [1] 2 3 ... 10