Ulysses

Ulysses Stuff => Releases => Topic started by: Lt.Smith on June 28, 2008, 06:06:24 AM

Title: PlayerTitle [v1.2] - A name and title display module
Post 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:

Known bugs and limitations:

Thanks to:


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)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Paulendy on June 28, 2008, 06:37:50 AM
I am still not a Pie :D
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 28, 2008, 06:46:59 AM
Please Rename ASAP.
http://forums.ulyssesmod.net/index.php/topic,3167.0.html
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Lt.Smith on June 28, 2008, 06:47:29 AM
Please Rename ASAP.
http://forums.ulyssesmod.net/index.php/topic,3167.0.html

Whoops, my bad.

Update: fixed. Sorry, didn't see that.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 28, 2008, 06:52:01 AM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Lt.Smith on June 28, 2008, 06:52:44 AM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 28, 2008, 08:13:43 AM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: LUADuck on June 28, 2008, 09:00:56 AM
(http://images.google.co.uk/url?q=http://i50.photobucket.com/albums/f306/WmV337/1_free_internet.jpg&usg=AFQjCNFZeRspHl3CiNJjebICXgs2JpFGDw)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: spbogie on June 28, 2008, 09:29:34 AM
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)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Megiddo on June 28, 2008, 12:41:44 PM
Nicely done, though I agree with spbogie, if you couild change the name that would be wonderful. :)

Thanks!
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Lt.Smith on June 29, 2008, 08:57:29 AM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Megiddo on June 29, 2008, 03:21:53 PM
- [ADDED] Added support for SQLite.

Kickin' rad. :)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Guardian9978 on June 29, 2008, 04:19:39 PM
URL for download is wrong:
Code: [Select]
http://"http//www.gmodsauce.com/staticfiles/releases/playertitle11.zip"Should be:
Code: [Select]
http//www.gmodsauce.com/staticfiles/releases/playertitle11.zip
after correction URL redirects to:
Code: [Select]
http://www.w3.org/Protocols/
Can you please give supply a link that works. I'd love to use this in my server.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: spbogie on June 29, 2008, 04:40:22 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Lt.Smith on June 29, 2008, 05:22:38 PM
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 :)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Guardian9978 on June 29, 2008, 10:18:26 PM
Thanks link works great.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Lt.Smith on July 02, 2008, 06:04:47 AM
Updated to v1.2

Code: [Select]
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
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Killers2 on July 06, 2008, 08:45:01 AM
I am using this on my server and it is pretty good addon  ;D

However on play disconnect it seems to crash my server  ???
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Sc00by22 on July 29, 2008, 12:00:30 PM
Could we make it so when they are dead, It hides their name?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: saintmark on July 31, 2008, 12:02:52 AM
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
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Sparky on August 19, 2008, 09:34:12 PM
I want to block this for some usergroups.
What command do I add to deny?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: WildWill on September 13, 2008, 09:01:06 AM
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?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Killers2 on September 21, 2008, 06:09:29 AM
Did you ever fix the crash when players disconnect?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: WildWill on September 21, 2008, 06:50:01 AM
Maybe give it another shot there Killer, this is running fine on my dedicated server.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on September 21, 2008, 01:34:28 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Cephalexin on December 23, 2008, 12:27:53 AM
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
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Lt.Smith on January 05, 2009, 07:21:54 AM
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 :)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Cephalexin on January 31, 2009, 10:14:09 AM
the player title also shows when spectating someone, would be nice to hide that on a future release
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Vexont on October 28, 2009, 04:55:58 PM
Could anyone make a new download link? The old one is broken.

Sorry for the epic bump.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on October 28, 2009, 06:46:51 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: DiscoBiscuit on November 01, 2009, 04:01:45 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: LiveTrash on November 12, 2009, 06:49:13 PM
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?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on November 12, 2009, 06:55:08 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: LiveTrash on November 13, 2009, 11:40:46 AM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: lavacano201014 on November 26, 2009, 05:25:36 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on November 26, 2009, 06:36:13 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: lavacano201014 on November 27, 2009, 12:07:20 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on November 27, 2009, 03:32:07 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: vader0146 on December 12, 2009, 11:20:45 AM
Mirror:

http://misc.diamondbuild.info/files/playertitle12.zip
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: NaRyan on January 01, 2010, 11:04:40 AM
Does anyone have a working link to the non svn version of this?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on January 01, 2010, 12:09:36 PM
NaRyan, Vader's link in the post above yours is non-SVN command structure.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: lavacano201014 on January 05, 2010, 03:47:36 PM
- !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:
Code: [Select]
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)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: TheDuck on April 02, 2010, 02:59:15 AM
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?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on April 02, 2010, 03:42:10 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: TheDuck on April 03, 2010, 01:25:42 AM
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!
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: xsmackeyx on May 19, 2010, 05:40:30 PM
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)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Buggzie on May 19, 2010, 05:59:53 PM
Can you make it so the sql file saves in the data folder instead of addons?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: blindbox on May 28, 2010, 03:51:25 PM
Kudos to you, but how I wish the player title can be displayed from further distance without fading.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Buggzie on June 21, 2010, 09:14:40 PM
Can someone rewrite this for SVN ULib and ULX, I've got no lua experience.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 22, 2010, 04:47:28 PM
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
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Buggzie on June 25, 2010, 04:52:18 AM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 25, 2010, 03:25:38 PM
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
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Nemata on June 27, 2010, 10:46:33 PM
Dead link for me  >:(
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 28, 2010, 03:15:25 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: lavacano201014 on June 29, 2010, 01:43:24 PM
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?)
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on June 29, 2010, 04:30:55 PM
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'.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: lavacano201014 on July 01, 2010, 09:33:46 PM
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?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on July 01, 2010, 09:39:40 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: lavacano201014 on July 01, 2010, 09:48:17 PM
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.
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: Fades on August 28, 2013, 05:34:07 PM
dead link. Somebody fix this?
Title: Re: PlayerTitle [v1.2] - A name and title display module
Post by: JamminR on August 28, 2013, 06:24:04 PM
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.