ULX

Author Topic: Rate people with ULX!  (Read 12999 times)

0 Members and 1 Guest are viewing this topic.

Offline Cbrad24

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Rate people with ULX!
« on: October 29, 2010, 06:47:57 AM »
Official Discussion: 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

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




Full Size: http://dl.dropbox.com/u/4990935/Images/GM_Screenies/Rater.png
« Last Edit: October 29, 2010, 06:56:37 AM by Cbrad24 »

Offline Fleamonji

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Re: Rate people with ULX!
« Reply #1 on: October 30, 2010, 07:00:30 AM »
Very nice.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Rate people with ULX!
« Reply #2 on: November 02, 2010, 04:45:01 PM »
Good work! Might want to mention that SVN ULX is required.
Experiencing God's grace one day at a time.

Offline riki137

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
  • lol wuttermelon
    • SapphireWebsites
Re: Rate people with ULX!
« Reply #3 on: November 09, 2010, 08:32:00 AM »
will this work for sui_scoreboard?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Rate people with ULX!
« Reply #4 on: November 09, 2010, 02:14:29 PM »
I think it will riki137, you just won't be able to rate them for everything.
Experiencing God's grace one day at a time.

Offline killforfun

  • Jr. Member
  • **
  • Posts: 51
  • Karma: 1
Re: Rate people with ULX!
« Reply #5 on: May 26, 2011, 09:36:16 PM »
Is this admin only?

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Rate people with ULX!
« Reply #6 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.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline sweetone

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 2
Re: Rate people with ULX!
« Reply #7 on: December 18, 2011, 05:35:22 PM »
This one is broken.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rate people with ULX!
« Reply #8 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.

« Last Edit: December 18, 2011, 07:15:15 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline sweetone

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 2
Re: Rate people with ULX!
« Reply #9 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)

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rate people with ULX!
« Reply #10 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?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline sweetone

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 2
Re: Rate people with ULX!
« Reply #11 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.
« Last Edit: December 19, 2011, 03:35:51 PM by sweetone »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rate people with ULX!
« Reply #12 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.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline sweetone

  • Jr. Member
  • **
  • Posts: 63
  • Karma: 2
Re: Rate people with ULX!
« Reply #13 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

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Rate people with ULX!
« Reply #14 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?
Experiencing God's grace one day at a time.