Ulysses

Ulysses Stuff => Releases => Topic started by: Bite That Apple on April 08, 2015, 10:44:04 PM

Title: Leaderboards Records! [1.04v]
Post by: Bite That Apple on April 08, 2015, 10:44:04 PM
Leaderboards Records


This addon is very easy to understand, though it can be complex depending on what version you decide to use. This addon keeps track of players leaderboards, and all. S
Please make sure you read this entire thing, OR YOU WILL BE CONFUSED!


Please Keep Note:
If you like this addon, I would really appreciate a "Compliment" Karma which is located next to my name. That's how I know you care :)
You must be registered and logged in the ulx forum to see the download link which is found under the preview image


Requirements:
You will ALSO need Ulib & Ulx because this addon uses its permission system.
(Recommended for multiple servers): Depending what version you decide to use, if you choose to use the MySQL version, you will need a webhost that supports MySQL, and the knowledge of simple MySQL.
You will also need the library to be able to use MySQL on a garry's mod server, if you do not have it already. This gets placed with the scrds.exe (if you're professionally hosting your server, chances are it already has libmySQL.dll with it). You can download the dll from here -> http://puu.sh/gTEIm/1c6e7fe8a9.zip (http://puu.sh/gTEIm/1c6e7fe8a9.zip)
You will also need the mysqloo dll file which gets placed in garrysmod/lua/bin (if the folder does not exist, then create it). You can download this dll from here -> http://puu.sh/gTEU8/df4c72e24f.zip (http://puu.sh/gTEU8/df4c72e24f.zip)
(Recommended for single servers): If you decide to just use this addon for one simple server, then you need nothing, except for ulx/ulib


HOW TO USE:
If you are not using the version that requires you to have a webhost that supports MySQL, then just drop the folder in the addons folder, and it will work.
If you are choosing to use the MySQL version, then you will need to understand how to setup a MySQL server, ect.


FEATURES:


TO-DO-LIST:
Make it easier to find someone in !score or yourself with like a findme button


KNOWN BUGS:
Only if you're using the MySQL version, and your webhost is being DDoS'd, or is having down time, which most likely would includ the mysql server, so stuff won't be recorded, and ye... so that would be the only problem I can see.


Preview:
i'll get some soon


DOWNLOAD LINK BELOW
You must be registered and logged in the ulx forum to see the download link which is found under the preview image
Title: Re: Leaderboards Records! [1.00v]
Post by: Bite That Apple on April 08, 2015, 11:02:56 PM
There might be a few issues with the normal default non-MySQL version of this, as I had to remake it, because I never make anything in normal garry's mod sql, I like to use mysql.
Title: Re: Leaderboards Records! [1.00v]
Post by: Belly136 on April 09, 2015, 11:42:21 AM
It gets messy on some custom chat boxes so i've edited line 175 and added one more below at cl_leaderboards

Code: [Select]
chat.AddText(Color(255,255,255),"[",Color(255,255,0),"Server",Color(255,255,255),"] ","Rank"," (",Color(153,0,0),SBNumber,".",Color(255,255,255),") ","With: ",Color(0,51,255),SBKills,Color(255,255,255)," Kills, ",Color(0,51,255),SBDeaths,Color(255,255,255)," Deaths and"," Ratio: ",Color(0,51,255),tostring(string.format("%.2f",tostring(SBRatio))))
chat.AddText(Color(255,255,255),"[",Color(255,255,0),"Server",Color(255,255,255),"] ","Type !score to view all players stats." )

Preview:
(http://s3.postimg.org/fi0n46xyr/Untitled.png)
Title: Re: Leaderboards Records! [1.00v]
Post by: Bite That Apple on April 09, 2015, 09:34:08 PM
It gets messy on some custom chat boxes so i've edited line 175 and added one more below at cl_leaderboards

Code: [Select]
chat.AddText(Color(255,255,255),"[",Color(255,255,0),"Server",Color(255,255,255),"] ","Rank"," (",Color(153,0,0),SBNumber,".",Color(255,255,255),") ","With: ",Color(0,51,255),SBKills,Color(255,255,255)," Kills, ",Color(0,51,255),SBDeaths,Color(255,255,255)," Deaths and"," Ratio: ",Color(0,51,255),tostring(string.format("%.2f",tostring(SBRatio))))
chat.AddText(Color(255,255,255),"[",Color(255,255,0),"Server",Color(255,255,255),"] ","Type !score to view all players stats." )

Preview:
(http://s3.postimg.org/fi0n46xyr/Untitled.png)

Looks nice, i'd suggestputting a comma after "Death", or it looks like one thing.
Title: Re: Leaderboards Records! [1.00v]
Post by: Belly136 on April 16, 2015, 04:53:59 AM
Can you make it compatible with prop hunt? Kills are not saving but ratio and deaths do.
I've tried one with mysql and one without but it's still the same.
Title: Re: Leaderboards Records! [1.00v]
Post by: Bite That Apple on April 16, 2015, 08:54:18 PM
Can you make it compatible with prop hunt? Kills are not saving but ratio and deaths do.
I've tried one with mysql and one without but it's still the same.

im not sure why prophunt would not allow you to get killed marked up in your score, so yeah....
Title: Re: Leaderboards Records! [1.00v]
Post by: Belly136 on April 17, 2015, 07:11:55 PM
Maybe try using ply:Frags() and then instead of 'Kills' use 'Score' ? I think that would work on any gamemode.
Title: Re: Leaderboards Records! [1.00v]
Post by: Aeternal on May 10, 2015, 06:24:04 PM
Hey, you left some MySQL info in sv_leaderboards.lua. Might wanna get rid of that.
Title: Re: Leaderboards Records! [1.00v]
Post by: Bite That Apple on May 11, 2015, 12:13:43 PM
Hey, you left some MySQL info in sv_leaderboards.lua. Might wanna get rid of that.

Thanks mate, didn't see that.
Title: Re: Leaderboards Records! [1.00v]
Post by: JosephTD on November 09, 2015, 11:45:19 PM
Mine counts deaths but not kills? an you help me?
Title: Re: Leaderboards Records! [1.01v]
Post by: Bite That Apple on November 10, 2015, 09:30:28 PM
Updated it so just in case user does not use ulx, it won't cause an error.
Title: Re: Leaderboards Records! [1.00v]
Post by: Bite That Apple on November 10, 2015, 10:11:22 PM
Mine counts deaths but not kills? an you help me?

My pakistan internet won't allow me to upload this anywhere else except here. This file is not useful to anyone else except him.
Title: Re: Leaderboards Records! [1.01v]
Post by: aznninja5996 on May 30, 2016, 11:05:26 AM
Well, Prop Hunt is using "pl:KillSilent()" when killing Props and then broadcasting the player, victim, and inflictor. Only Hunters use "Player:Kill," thus only counting deaths of Hunters. I'm trying to rewrite the sv_leaderboards to hook onto Prop Hunt's "ENT:OnTakeDamage(dmg)" function found in "prop_hunt\entities\ph_prop\init.lua" Then I will filter out when the prop dies, it will trigger the rest of the original "PDLeaderBoards" function, using the name variables from the "ENT:OnTakeDamage(dmg)" function. I'm no good coder, but it doesn't hurt to try. If someone has a better solution or a fix already, please let me know!

EDIT: I gave it a couple tries for about half and hour and couldn't make it work.
Title: Re: Leaderboards Records! [1.02v]
Post by: Bite That Apple on July 03, 2016, 11:37:28 PM
I fixed this addon. Garry decided to break some things a few weeks/months ago with linux machines, and ye.
Title: Re: Leaderboards Records! [1.02v]
Post by: Undercover Orange on July 12, 2016, 02:16:45 AM
great scoreboard. after a small tweak I got it to work on my prop hunt server. but is there any way for my to reset it? could you add a ulx command to do that or do i need to do it in the files?
Title: Re: Leaderboards Records! [1.02v]
Post by: Bite That Apple on July 16, 2016, 01:45:56 AM
great scoreboard. after a small tweak I got it to work on my prop hunt server. but is there any way for my to reset it? could you add a ulx command to do that or do i need to do it in the files?

"Allows you to reset a single players data if that player has permission to do so from ulx"...

If you have the ulx permission set from "apple scoreboard" then yes, you can.
Title: Re: Leaderboards Records! [1.02v]
Post by: Undercover Orange on July 16, 2016, 06:44:10 AM
oh sorry. i must have missed that
Title: Re: Leaderboards Records! [1.04v]
Post by: Mkekala on December 29, 2016, 03:36:30 PM
Thanks a lot for making this addon and releasing it for free! I utilized it for my TTT and Darkest Days servers and made a smooth web based leaderboard thanks to the MySQL capability.
Title: Re: Leaderboards Records! [1.04v]
Post by: Shu | Pexie on August 09, 2018, 10:18:50 PM
It must be very annoying reporting errors to you since, you don't make these type of things anymore, but new error found it :) (Not using the MySQL version)

Code: [Select]
[ERROR] lua/autorun/sv_leaderboards.lua:178: bad argument #1 to 'pairs' (table expected, got nil)
  1. pairs - [C]:-1
   2. unknown - lua/autorun/sv_leaderboards.lua:178

Timer Failed! [Simple][@lua/autorun/sv_leaderboards.lua (line 177)]

Also it doesn't appear your menu in the ULX Menu (Yeah i checked in XGUI)