Ulysses

Ulysses Stuff => Releases => Ulysses Release Archives => Topic started by: Cbrad24 on October 29, 2010, 06:47:57 AM

Title: Rate people with ULX!
Post by: Cbrad24 on October 29, 2010, 06:47:57 AM
Official Discussion: https://www.icannt.org/showthread.php?t=11747 (https://www.icannt.org/showthread.php?t=11747)

So I was on my sandbox one time and I ended up fiddling round with ULX and Ratings, and I came up with this. A plugin to allow you to rate people with ULX. Thought I'd just share it out here. Probably update it soon with another command or two.

Code: [Select]
Usage:
ulx rate <players> <rating> [<amount: 1<=x<=10000, default 1>] - Rate the target players. (say: !rate)
Download:
http://dl.dropbox.com/u/4990935/Scripts/rate.lua (http://dl.dropbox.com/u/4990935/Scripts/rate.lua)

Installation:
Put file into "garrysmod\addons\ulx\lua\ulx\modules\sh\rate.lua" and apply a full server restart.

Applications:
ulx rate minge123 naughty 5000
ulx rate ^ love 9001 (In ulx, doing ^ is self)

Enjoy! :3

(http://dl.dropbox.com/u/4990935/Images/GM_Screenies/Rater2.png)

(http://dl.dropbox.com/u/4990935/Images/GM_Screenies/Rater.png)
Full Size: http://dl.dropbox.com/u/4990935/Images/GM_Screenies/Rater.png (http://dl.dropbox.com/u/4990935/Images/GM_Screenies/Rater.png)
Title: Re: Rate people with ULX!
Post by: Fleamonji on October 30, 2010, 07:00:30 AM
Very nice.
Title: Re: Rate people with ULX!
Post by: Megiddo on November 02, 2010, 04:45:01 PM
Good work! Might want to mention that SVN ULX is required.
Title: Re: Rate people with ULX!
Post by: riki137 on November 09, 2010, 08:32:00 AM
will this work for sui_scoreboard?
Title: Re: Rate people with ULX!
Post by: Megiddo on November 09, 2010, 02:14:29 PM
I think it will riki137, you just won't be able to rate them for everything.
Title: Re: Rate people with ULX!
Post by: killforfun on May 26, 2011, 09:36:16 PM
Is this admin only?
Title: Re: Rate people with ULX!
Post by: Stickly Man! on May 26, 2011, 10:50:26 PM
Just by looking at the code, it looks like it will only allow superadmins to access it, unless you give another group access to the "ulx rate" command.
Title: Re: Rate people with ULX!
Post by: sweetone on December 18, 2011, 05:35:22 PM
This one is broken.
Title: Re: Rate people with ULX!
Post by: JamminR on December 18, 2011, 07:07:31 PM
Sweetone, you know better than that.
Don't ever come to a release on any forum, ulyssesmod included, and say something is broken without details.
What you're typing. What you expect. Where did you put the file (location, and, server or client)
Did it work before? When? What happen lately that it stopped working for you if it did?
What errors on server console?
What errors on client console?
Version of ULX. (SVN or release)?
Version of ULib. (SVN or release)?
Any other detail you can give will help someone help you.
Again, ANY forum, not just Ulysses.

Title: Re: Rate people with ULX!
Post by: sweetone on December 19, 2011, 08:50:27 AM
Sweetone, you know better than that.
Don't ever come to a release on any forum, ulyssesmod included, and say something is broken without details.
What you're typing. What you expect. Where did you put the file (location, and, server or client)
Did it work before? When? What happen lately that it stopped working for you if it did?
What errors on server console?
What errors on client console?
Version of ULX. (SVN or release)?
Version of ULib. (SVN or release)?
Any other detail you can give will help someone help you.
Again, ANY forum, not just Ulysses.

You're right.

I added this first time yesterday and tryed it.

I go to xgui, utility and rate, I set myself 1 builder rating and nothing happens.

No errors on server/client console.

I have svn versions of ulx(rev 191) and ulib(rev 197)
Title: Re: Rate people with ULX!
Post by: JamminR on December 19, 2011, 01:56:19 PM
Great, good start.
So, let's rule out XGUI 100%.
Try straight from game or even server console (or both).
In game console, type in "ulx rate ^ builder 1"
If no errors,
Did it increase your count? What scoreboard are you using?
Where did you post the code (filename, and path, and posted on server path not client, right?)
Additionally, when pasting the code into a file..what did you use... Windows notepad?
Reason I ask, if windows, depending on settings, notepad will save <anything>.lua as <anything>.lua.txt and Windows explorer will hide the .txt from you, therefore never getting included when server starts.

If using a nonstandard scoreboard with ratings on it...does increasing rating the 'normal' way work?
Title: Re: Rate people with ULX!
Post by: sweetone on December 19, 2011, 03:30:26 PM
Great, good start.
So, let's rule out XGUI 100%.
Try straight from game or even server console (or both).
In game console, type in "ulx rate ^ builder 1"
If no errors,
Did it increase your count? What scoreboard are you using?
Where did you post the code (filename, and path, and posted on server path not client, right?)
Additionally, when pasting the code into a file..what did you use... Windows notepad?
Reason I ask, if windows, depending on settings, notepad will save <anything>.lua as <anything>.lua.txt and Windows explorer will hide the .txt from you, therefore never getting included when server starts.

If using a nonstandard scoreboard with ratings on it...does increasing rating the 'normal' way work?

I tryed both consoles and no increasing but I got error message when I tryed in server's console [addons/ulx/lua/ulx/modules/sh/rate.lua:39] attempt to call method 'unique ID' (a nil value)

I'm using sui_scoreboard_modified_v2(http://forums.ulyssesmod.net/index.php/topic,3650.0.html this one if i remember right) and normal rate increasing works normal way

Addons/ulx/lua/ulx/modules/sh/rate.lua

Yes I did it with windows notepad but I removed the whole name first including .txt so its rate.lua.
Title: Re: Rate people with ULX!
Post by: JamminR on December 19, 2011, 03:54:16 PM
Ok, so, the server console error shows that <something> is working. The line and error indicated would never work on a server, and the author didn't write any way error checking for it. Not a big deal. (Specifically, code tries to look up unique player ID of person running the command... From "Console" of a server, there is no uniqueID.

But, as for where from there it's going on the actual game, I'm unsure.
I don't know the sqlite (server.db) file tables enough to know if it's updating them properly.
Meg? Stick? MrPres? Anyone else here know if the rating tables the code is updating are the same now as they were when this was released?

Sweetone, I'm also curious..if you leave and rejoin the server, does your scoreboard show the update?
It could just be a scoreboard not updating realtime issue.
Title: Re: Rate people with ULX!
Post by: sweetone on December 19, 2011, 04:25:22 PM
Ok, so, the server console error shows that <something> is working. The line and error indicated would never work on a server, and the author didn't write any way error checking for it. Not a big deal. (Specifically, code tries to look up unique player ID of person running the command... From "Console" of a server, there is no uniqueID.

But, as for where from there it's going on the actual game, I'm unsure.
I don't know the sqlite (server.db) file tables enough to know if it's updating them properly.
Meg? Stick? MrPres? Anyone else here know if the rating tables the code is updating are the same now as they were when this was released?

Sweetone, I'm also curious..if you leave and rejoin the server, does your scoreboard show the update?
It could just be a scoreboard not updating realtime issue.

:) no it don't show the update
Title: Re: Rate people with ULX!
Post by: Megiddo on December 19, 2011, 05:53:58 PM
Hmm... this module was written before I rewrote the ULX logging system... but that alone shouldn't break it.

If you're not getting any errors, it would seem to indicate that garry has changed the way votes are recorded since the time this was released. Does voting from the sui scoreboard itself still work fine?
Title: Re: Rate people with ULX!
Post by: sweetone on December 19, 2011, 06:39:10 PM
Hmm... this module was written before I rewrote the ULX logging system... but that alone shouldn't break it.

If you're not getting any errors, it would seem to indicate that garry has changed the way votes are recorded since the time this was released. Does voting from the sui scoreboard itself still work fine?

Like I said before, yes :)
Title: Re: Rate people with ULX!
Post by: JamminR on December 19, 2011, 08:18:56 PM
normal rate increasing works normal way

Meg, though his normal might be different than using the scoreboard, my guess is yes.