Poll

Was this addon useful to you?

Yes it was, thank you :)
17 (94.4%)
No, try better next time! :(
1 (5.6%)

Total Members Voted: 18

Author Topic: Leaderboards Records! [1.04v]  (Read 22567 times)

0 Members and 1 Guest are viewing this topic.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Leaderboards Records! [1.04v]
« 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
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
(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:
  • Keeps track of all player's kills,deaths, and radio
  • Allows you to reset a single players data if that player has permission to do so from ulx
  • !score and open up the scoreboard.
  • !rank tells you your score information, and what rank you are so you can find yourself in !score
  • If you use the MySQL version, it will keep track of all your killing/deaths in all of your servers


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
« Last Edit: September 01, 2016, 08:36:58 PM by Bite That Apple »
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.00v]
« Reply #1 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.
« Last Edit: April 08, 2015, 11:16:50 PM by Bite That Apple »
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
Re: Leaderboards Records! [1.00v]
« Reply #2 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:
« Last Edit: April 09, 2015, 11:44:29 AM by Belly136 »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.00v]
« Reply #3 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:


Looks nice, i'd suggestputting a comma after "Death", or it looks like one thing.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
Re: Leaderboards Records! [1.00v]
« Reply #4 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.
« Last Edit: April 16, 2015, 12:13:18 PM by Belly136 »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.00v]
« Reply #5 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....
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
Re: Leaderboards Records! [1.00v]
« Reply #6 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.
« Last Edit: April 26, 2015, 05:41:06 PM by Belly136 »

Offline Aeternal

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
  • ~So Fancy~
Re: Leaderboards Records! [1.00v]
« Reply #7 on: May 10, 2015, 06:24:04 PM »
Hey, you left some MySQL info in sv_leaderboards.lua. Might wanna get rid of that.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.00v]
« Reply #8 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.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline JosephTD

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Leaderboards Records! [1.00v]
« Reply #9 on: November 09, 2015, 11:45:19 PM »
Mine counts deaths but not kills? an you help me?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.01v]
« Reply #10 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.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.00v]
« Reply #11 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.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline aznninja5996

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Leaderboards Records! [1.01v]
« Reply #12 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.
« Last Edit: May 30, 2016, 11:49:46 AM by aznninja5996 »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Leaderboards Records! [1.02v]
« Reply #13 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.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Undercover Orange

  • Full Member
  • ***
  • Posts: 139
  • Karma: -14
  • Leader of Undercover Gaming Community
Re: Leaderboards Records! [1.02v]
« Reply #14 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?
~ Undercover Orange