Ulysses
Ulysses Stuff => Releases => Topic started by: Lt.Smith on June 28, 2008, 06:06:24 AM
-
Hey guys, I always used to like the fact that player names and titles popped up in ServerSecure (way back when), so I thought I'd recreate it for my favorite admin mod.
This addon displays names and an optional user titles above player's heads. For titles you need Ulib/ULX, but otherwise the names should display anyway. You can now choose between using SQLite, which is built into gmod, and mySQL if you want to store titles externally or span across multiple servers like me. There's also plenty of configuration you can do, but it'll work right off the bat too.
(http://www.gmodsauce.com/coppermine/albums/userpics/10001/normal_gm_construct0018.jpg)(http://www.gmodsauce.com/coppermine/albums/userpics/10001/normal_gm_construct0023.jpg)
Installation:
- Extract the PlayerTitle folder to your addons folder.
- Read the readme for instructions!
- Done!
Known bugs and limitations:
- Sometimes when a map has ledges (such as gm_construct) the trace messes up and a player's name can disappear.
- If your database is far away, it can take a while to set the player's title as the query is executed. The game freezes during this time.
- When you hover over a player it still shows the default name and health info. Not really a bug but I have no clue how to remove it.
- Titles can be no longer than 40 characters. If you try to set a longer title the script stops you.
Thanks to:
- Screen location script copied from MrPresident's anti-AFK script. Later modified somewhat to include alpha calculations and title display etc.
- Spbogie for the suggestion of a query handler function to allow both mySQL and SQLite.
- Thanks to Pfc. Johnson for helping me test and debug.
- Also thanks to the people in the GmodSauce Sandbox server for their patience with my frequent resets, especially Paulendy, Hamit and Thizm.
CHANGELOG:
v1.2
- [ADDED] Added check to see if player was ragdolled/jailed/turned into a melon. Names are hidden during this time to prevent them from showing up at wierd locations.
v1.1
- [ADDED] Added support for SQLite.
- [ADDED] Added SQL subroutine to handle queries.
- [CHANGED] Name changed for Team Ulysses. Sorry guys, my mistake!
- [CHANGED] Added mySQL configuration options instead of hardcoding connection details.
v1.0
- Initial release.
Download (http://www.gmodsauce.com/staticfiles/releases/playertitle12.zip)
-
I am still not a Pie :D
-
Please Rename ASAP.
http://forums.ulyssesmod.net/index.php/topic,3167.0.html
-
Please Rename ASAP.
http://forums.ulyssesmod.net/index.php/topic,3167.0.html
Whoops, my bad.
Update: fixed. Sorry, didn't see that.
-
It's ok. Please make sure you work on the actual info.txt, file name and any other places the original name is mentioned. Uname was released to the wild a few months ago.
Thanks.
-
It's ok. Please make sure you work on the actual info.txt, file name and any other places the original name is mentioned. Uname was released to the wild a few months ago.
Thanks.
Done done and done.
-
EXCELLENT work!
Reminds me of the old ulx 1 module someone wrote called flags.
Think it might have been golden-death that wrote it. Not sure. I'll look in the old releases later.
-
(http://images.google.co.uk/url?q=http://i50.photobucket.com/albums/f306/WmV337/1_free_internet.jpg&usg=AFQjCNFZeRspHl3CiNJjebICXgs2JpFGDw)
-
I hate to ask you to change the name yet again, but we do try to reserve the U for releases made by Ulysses Team Members. It's not as big of a deal as big of a deal as with the duplicate name, but would be appreciated if you could.
Other than that, looks very interesting.
Assuming you don't use anything from the list here http://sqlite.org/omitted.html (http://sqlite.org/omitted.html), it should be fairly simple to allow support for either type of database. I haven't looked at the code to see how modular you have made it, but if you wanted to add support for both database types, the easiest way would probably be to create a wrapper query function that you could just pass the string to, and only have to write the code to deal with the different databases once.
Edit: Lt. Smith, I have sent you a PM. Please check your inbox (in the userinfo box at top of page)
-
Nicely done, though I agree with spbogie, if you couild change the name that would be wonderful. :)
Thanks!
-
Sorry fellas, I failed to realise that the u is for ulysses stuff. My mistake, I'll change it tonight when I get home. Thanks for the encouraging words, I've been writing code for about 6 months now but this is the first actual release I've made.
As far as the code is concerned, It's poorly commented and it's about as modular as... as... well, something that isn't modular. Good idea about the SQL wrapper function, thanks. I'll try implementing that tonight, since the queries are very simple, just SELECT, INSERT and UPDATE queries. I'll even try and set it up so that if the mySQL module isn't loaded it defaults to SQLite so it doesn't go flat on its face if it messes up.
Update: Name changed, working on v1.1 right now. Thanks spbogie.
UPDATE:
I updated to version 1.1, which includes choosing your storage method and contains a few other tweaks. Overall I'm pretty excited about it :D
CHANGELOG:
v1.1
- [CHANGED] Name changed for Team Ulysses. Sorry guys, my mistake!
- [CHANGED] Added mySQL configuration options instead of hardcoding connection details.
- [ADDED] Added support for SQLite.
- [ADDED] Added SQL subroutine to handle queries.
v1.0
- Initial release.
-
- [ADDED] Added support for SQLite.
Kickin' rad. :)
-
URL for download is wrong:
http://"http//www.gmodsauce.com/staticfiles/releases/playertitle11.zip"
Should be:
http//www.gmodsauce.com/staticfiles/releases/playertitle11.zip
after correction URL redirects to:
http://www.w3.org/Protocols/
Can you please give supply a link that works. I'd love to use this in my server.
-
Lt.Smith, SMF doesn't like when you put quotes around a url, and thus adds the extra http:// infront of it. Simple fix, just put the url w/o quotes.
-
Fixed. I use SMF for my forums too, but I used IPB for about a year, so it's hard breaking old habits.
Hope you guys enjoy it :)
-
Thanks link works great.
-
Updated to v1.2
v1.2
- [ADDED] Added check to see if player was ragdolled/jailed/turned into a melon. Names are hidden during this time to prevent them from showing up at wierd locations.
Now when a player is ragdolled their name won't show up in places where it shouldn't be. It might seem to update a little slowly, but the timer only checks every 4 seconds what the player's status is, to prevent having to sync every half a second. This only works with ULX because it makes use of ulx.getExclusive(). But if you don't have ULX, the timer and checking function won't load anyway, so no problem.
Besides, if you don't have ULX, what are you doing, go download it! :P
-
I am using this on my server and it is pretty good addon ;D
However on play disconnect it seems to crash my server ???
-
Could we make it so when they are dead, It hides their name?
-
Lt. Smith
My hat goes off to you Sir...
Great idea and My guys love it...
This will be a permanent part of my server from now on!
Awesome Work
-
I want to block this for some usergroups.
What command do I add to deny?
-
I'm running this on my server right now and it's very nice indeed. Only one issue that I ask, can you make it so that when people are cloaked the tags are gone?
-
Did you ever fix the crash when players disconnect?
-
Maybe give it another shot there Killer, this is running fine on my dedicated server.
-
I'm running this on my server right now and it's very nice indeed. Only one issue that I ask, can you make it so that when people are cloaked the tags are gone?
Nice idea Will. Sorry I didn't think/notice this sooner.
Smith, this shouldn't be too difficult. I've not looked at your code to see where the 'skip adding text/hide text/do nothing if cloaked' code bit would go, but ULX tags on a "ghosted" true tag to the player index. ULX's GetExclusive "ghosted" is also set.
I believe you should be able to add this without requiring the downloader have ULX installed (therefore making it compatible to non-ULX servers)
-edited by WildWill Smith's script, not Jays.
-
can you make it so it hides when the user is cloaked? because it pretty much takes away the whole point of cloaking
or if someone could tell me how to modify it?
Thanks,
//Craig
-
Nice idea Will. Sorry I didn't think/notice this sooner.
Smith, this shouldn't be too difficult. I've not looked at your code to see where the 'skip adding text/hide text/do nothing if cloaked' code bit would go, but ULX tags on a "ghosted" true tag to the player index. ULX's GetExclusive "ghosted" is also set.
I believe you should be able to add this without requiring the downloader have ULX installed (therefore making it compatible to non-ULX servers)
-edited by WildWill Smith's script, not Jays.
Man, I haven't checked back here. It already hides when people are ghosted, because it checks exclusive flags if I'm not mistaken. It's been a while since I looked at this.
It's on my to-do list but to be honest I have examinations soon so I'm rather preoccupied. It's nice to see people enjoy the addon though :)
-
the player title also shows when spectating someone, would be nice to hide that on a future release
-
Could anyone make a new download link? The old one is broken.
Sorry for the epic bump.
-
LtSmith seems to still visit here occasionally. His profile shows last visit end of August.
Try sending a PM, or see if he has his email listed publicly in his profile.
(I know I can see it, but I'm logged in as admin)
The domain he originally linked to ( www.gmodsauce.com ) still exists and runs an SMF Gmod forum, just seems no files are currently listed. Seems to be going through a rebuild.
I'd be curious if the ULib portions of it still work both with our release, and our latest SVN rewrites.
-
I can say from testing it only half works with SVN ulib and ULX.
The actual names work but the !title and !mytitle functions do not, nor do they through console.
-
The link http//www.gmodsauce.com/staticfiles/releases/playertitle11.zip is broken. Redirects to a WikiPedia page about HyperText Transfer Protocol. Is there a page that has this download available?
-
See http://forums.ulyssesmod.net/index.php/topic,3487.msg16984.html#msg16984
Other than the already provided information and not necessarily helpful yet links.. no.
-
Too bad, it's a nice addon. I'll have to see if I can just get it off one of my friends. He has it on his server.
-
I have the files on my server now. And from it's behavior, the only thing that seems to need changed is the new functions for !title and !mytitle.
If someone could tell me the syntaxes for the new functions (and their old counterparts), I can fix this.
-
Directly, the ULib portions that even ULX relies on for all it's commands, most of them can be found here - (http://ulyssesmod.net/docs/files/lua/ULib/shared/commands-lua.html)http://ulyssesmod.net/docs/files/lua/ULib/shared/commands-lua.html
I've never looked at the code of player title to know how close it is to ULX originally.
However, for a perfect example of ULX command system "before and after", see MrPresident's "ulx explode" in the releases section.
The original post has code for the old non-SVN ULX.
The last page or so, look for my post with an attachment which I practiced converting it.
To me, the new command system looked scary at first... however, once I realized it was just treating each 'function' as an object, then allowing various checks on the options/variables/input of that function command setup instead of the function itself checking every time...it became clear, and in my opinion, much less convoluted.
The way we have the command system now, you can spend time on writing the function, instead of sanity checking the input to the function. The command system does most of the checking for you.
-
Done.
Two files are attached.
The zip file is the addon in it's entirety if you don't have it. This one is edited for the SVN.
The lone Lua file is the replacement file, if you have the addon already. Replace lua/ulx/modules/playertitle.lua
[ Changes ]
* Reflects new command system
* Quotes are no longer needed! But you can still use them if you want (call it legacy support)
* Made the comments pure Lua.
[ Known Limitations ]
- !mytitle isn't doing anything. It SHOULD be echoing, but it isn't.
- !settitle doesn't echo back when you change someone else's title. It still changes, however.
-
Nice conversion.
I've no idea if you like to tinker like I do but if your interested there can be more cleanup of code to use the new command system.
Certain checks are done within the functions that very well could be done (or removed because they're already done) by the command set up.
Please don't take that as criticism... it's sometimes difficult to tell in a 2d text world.
I mean to simply state that if you're in a tweaking mood that it can still be done, including fixing of the echo logs.
If you want some more assistance, feel free to post the lua file in the developers corner forum area with questions/comments/snide remarks. :P
I like exercising my mind ... small bits like this help.
-
Mirror:
http://misc.diamondbuild.info/files/playertitle12.zip
-
Does anyone have a working link to the non svn version of this?
-
NaRyan, Vader's link in the post above yours is non-SVN command structure.
-
- !mytitle isn't doing anything. It SHOULD be echoing, but it isn't.
Found the problem here. I apparently didn't capitalize an L in ULib.
Since I can't upload the file in question (outside my normal environment atm), I would like to ask all those who downloaded my fix'd up version to find the line in lua/ulx/modules/playertitle.lua where it says something like:
title:setDefaultAccess(Ulib.ACCESS_ALL)
and capitalize the L in ULib.
(if it helps, searching for "local title = " in the code will put you a line or three above it)
-
Hi everybody!
I need help with ulx plugin called PlayerTitle (http://forums.ulyssesmod.net/index.php?topic=3487.0). I see many servers with this working, but cannot get it work on my server. I have checked the settings and they are correct. The problem is that any title commands (!title, !mytitle) doesnt work. I have tried to userallow and groupallow ulx title, playertitle etc. but didnt work. I see playernames which are also in the addon, so only titles wont work.
Any ideas?
-
Duck, if you have SVN of ULX, read the past few posts. Lavacano made a version for SVN, and another user I think corrects a line in it.
If you don't have svn of ULX, then it's possible you downloaded the SVN version of Playertitle.
The command structure of ULX svn is totally different. Most of the releases here are for non-svn.
Several of them have posts in later pages where the community or devs have made SVN versions. Just have to look for them.
What errors occur starting the server when this module attempts to load?
What errors occur when you try to run any of the commands.
-
Oh thank you, didnt really read these messages carefully... I just downloaded vader's version. I have ulx svn so that other worked fine. Thanks!
-
The diamond build link apparently isn't working, but I found this working link off of the gmodsauce website after a quick google search.
http://stuff.gmodsauce.com/releases/playertitle12.zip (http://stuff.gmodsauce.com/releases/playertitle12.zip)
-
Can you make it so the sql file saves in the data folder instead of addons?
-
Kudos to you, but how I wish the player title can be displayed from further distance without fading.
-
Can someone rewrite this for SVN ULib and ULX, I've got no lua experience.
-
Buggzie, I'm gonna beat you if you don't start learning to use the search feature of our forum, let alone learning Lua.
:P
http://forums.ulyssesmod.net/index.php/topic,3487.msg17354.html#msg17354
-
Could someone help me make the MySQL Connection Persistent please, as it lags when someone types !title <title>
Plus I fixed the !mytitle and !settitle tsay commands.
you also have a typo of an unlowercased Ulib on line 94
EDIT by Megiddo: No swearing please, there are children on this forum.
-
Could someone help me make the MySQL Connection Persistent please, as it lags when someone types !title <title>
Plus I fixed the !mytitle and !settitle tsay commands.
you also have a typo of an unlowercased Ulib on line 94
EDIT by Megiddo: No swearing please, there are children on this forum.
/me fwaps buggzie
http://forums.ulyssesmod.net/index.php/topic,3487.msg17791.html#msg17791
-
Dead link for me >:(
-
Nemata, svn is soon (relatively speaking, I'm guessing this summer/fall) anyway.
It's becoming more and more difficult to support release due to Garry's updates.
May wish to either start using SVN to get used to it, or hold off until our next release.
One of my self-tasked projects once we release again is to find all the various projects people/authors have released "SVN' versions for, review them for compatibility and errors, and re-release.
-
Nemata, svn is soon (relatively speaking, I'm guessing this summer/fall) anyway.
It's becoming more and more difficult to support release due to Garry's updates.
May wish to either start using SVN to get used to it, or hold off until our next release.
One of my self-tasked projects once we release again is to find all the various projects people/authors have released "SVN' versions for, review them for compatibility and errors, and re-release.
That reminds me, I wanted to offer up my uber-edited version of PlayerTitle for public use.
And possibly take over the project (maybe) seeing as the OP hasn't been around since 2009, nor has the actual original post been edited since 2008. If he appears and says no, I'll gladly step down (not step up?)
-
Lavacano, for our SVN or release?
Either way, make a release post. We have several UTime releases floating about here, an extra player title one wouldn't hurt.
Just give the original credit where credit's due.
You may even have a snappier title or have made enough changes it's no longer just "player title'.
-
You may even have a snappier title or have made enough changes it's no longer just "player title'.
This. It's not even entirely exclusively ULX anymore due to the way I did it - the actual player title stuff works in a seperate "core", and the ULX commands just call functions.
It comes with an E2 extension as well.
Think I should make a release thread here or just go to Facepunch?
-
I rarely like releasing to FP anymore, but it's really your choice.
Releasing here would allow you to attach the zip.
Facepunch, you'd have to use garrysmod.org or another host site.
I peronally have never registered and most likely never will.
Whatever you decide, make a post here in releases at least pointing to the main support forum you'll update/help people with.
-
I rarely like releasing to FP anymore, but it's really your choice.
Releasing here would allow you to attach the zip.
Facepunch, you'd have to use garrysmod.org or another host site.
I peronally have never registered and most likely never will.
Whatever you decide, make a post here in releases at least pointing to the main support forum you'll update/help people with.
I'll release here (after actually getting a check in the E2 extension I've been meaning to put in there), with a ZIP and an SVN.
-
dead link. Somebody fix this?
-
It's from 2010.
There's a slightly newer but still unworking Player Title ][.
Find it. Ask in it nicely.
(In fact, it's got some code posted in it from recent/post Gmod13...see if it works)
Locking this topic.
EDIT. NO! It's from 2008, the last post was from 2010.
Way to necro an old release on your first post to Ulysses forums.