Raised This Month: $106 Target: $400
 26% 

BrainBread Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Statistical       
JonnyBoy0719
Member
Join Date: Apr 2012
Location: Sweden
Old 01-06-2015 , 07:00   BrainBread Stats
Reply With Quote #1

This plugin will only work for BrainBread


Description:
This plugin will save all of your stats to a MySQL server, which multiple servers can use w/o needing to copy players.lvl.


Tested on:
* brainbread v1.2 (metamod v1.21p37 + amxmodx 1.8.2)


Server requirements:
* brainbread
* amxmodx 1.8x
* mysqld


Client commands:
/autoload -- Will auto load the skills
/reset -- Resets your skills and in return it converts them back to points.
/loadpoints -- Load your points if you don't have autoload enabled
/rank -- Shows your current rank
/web -- Shows webstats url


How it works:
Simply copy the bb_stats.amxx to your plugins folder and add bb_stats.amxx under configs/plugins.ini file.

Now open configs/sql.cfg and add the new commands:
bb_host "127.0.0.1"
bb_user "root"
bb_pass ""
bb_type "mysql"
bb_dbname "my_database"
bb_table "bb_stats"
bb_rank_table "bb_stats_rank"


Web GUI:
Make sure you install the web gui on your apache folder (you can find all files under `web/` folder) and not copying it to your actual brainbread server!
You also need to make sure to setup the configurations on the config.php.


Web GUI Demo
If you want to see how the Web GUI looks like, you can do so by going to our official BrainBread Stats page for our server!
Demo: Click here!


Special Thanks:
* Noname for helping me fix the EXP bug
* XxAvalanchexX for his amazing brainbread include file


Bugs:
* None so far!


changelog:
v2.0-2.5 [2015-03-30]
* Added bb_rank_table
* Added web gui
* Fixed bb_stats saving (Replaced with UPDATE instead of REPLACE INTO)
v1.4-v2.0 [2015-01-09]
* Added new convars: bb_gameinfo, bb_webstats_url & bb_ranking
* Minor code changes
* Ranking supported. /top10 will be implemented when the radio menu gets fixed up for BrainBread
v1.3 [2015-01-06]
* Fixed EXP multiply loading problem
* Added a checker to make sure it won't override player.lvl (Player Data file)
* Added a new convar bb_filerewrite (default: 0) This convar will override the warning, if you want it to override and rewrite the player data file.
v1.2 [2015-01-06]
* Added a new client command "load points"
* Fixed some minor bugs
* It will now always start with "autoload" disabled when a new user has been created on the SQL.
v1.1 [2015-01-06]
* Fixed some typos on the SMA
* Added concommands
v1.0 [2015-01-06]
* Initial release


Notes:
This plugin is similar to noname's SQL plugin, but he never released it due to a HDD crash. And I want to thank him for helping me fixing the EXP bug! And I have also updated XxAvalanchexX brainbread.inc file, so now it can get and set/add new EXP.

download:
GitHub
or look on the attachments below!
Attached Files
File Type: inc brainbread.inc (12.6 KB, 110 views)
File Type: sma Get Plugin or Get Source (bb_stats.sma - 326 views - 23.8 KB)
File Type: zip web.zip (358.9 KB, 108 views)
__________________

Last edited by JonnyBoy0719; 03-29-2015 at 22:07. Reason: Updated to v2.5, and fixed some typos
JonnyBoy0719 is offline
Send a message via Skype™ to JonnyBoy0719
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-06-2015 , 08:42   Re: BrainBread Stats
Reply With Quote #2

Removed AMXX file, you are not allowed to include compiled plugins.
__________________
Arkshine is offline
JonnyBoy0719
Member
Join Date: Apr 2012
Location: Sweden
Old 01-06-2015 , 08:46   Re: BrainBread Stats
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Removed AMXX file, you are not allowed to include compiled plugins.
The compiler can't compile the SMA due its using the custom include file, people have done this in the past due to this reason, why not now?
Code:
Plugin failed to compile! Please try contacting the author.Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team  /home/forums/content/files/1/7/8/5/2/4/141333.attach(2) : fatal error 100: cannot read from file: "brainbread"  Compilation aborted. 1 Error.
Anyway, all files can be found on the github instead if the amxx is such a huge problem.
__________________
JonnyBoy0719 is offline
Send a message via Skype™ to JonnyBoy0719
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-06-2015 , 08:48   Re: BrainBread Stats
Reply With Quote #4

Because it was taken advantage of and a malicious plugin was distributed. We now no longer allow people, other than AM Staff, to attach AMXX files. People need to learn to compile the plugins themselves.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (intervening in a thread, asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
JonnyBoy0719
Member
Join Date: Apr 2012
Location: Sweden
Old 01-06-2015 , 08:50   Re: BrainBread Stats
Reply With Quote #5

Quote:
Originally Posted by YamiKaitou View Post
Because it was taken advantage of and a malicious plugin was distributed. We now no longer allow people, other than AM Staff, to attach AMXX files. People need to learn to compile the plugins themselves.
That's a good reason, thanks for clearing it up.
__________________
JonnyBoy0719 is offline
Send a message via Skype™ to JonnyBoy0719
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 01-06-2015 , 09:02   Re: BrainBread Stats
Reply With Quote #6

Nice Plugin
tousif is offline
JonnyBoy0719
Member
Join Date: Apr 2012
Location: Sweden
Old 01-06-2015 , 09:09   Re: BrainBread Stats
Reply With Quote #7

Updated it, added some client commands, and fixed some typos on the actual plugin.
__________________
JonnyBoy0719 is offline
Send a message via Skype™ to JonnyBoy0719
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 01-06-2015 , 09:17   Re: BrainBread Stats
Reply With Quote #8

is this plugin consists reset data or clear old one and start new For admins or server modretors from game

Last edited by tousif; 01-06-2015 at 09:20.
tousif is offline
JonnyBoy0719
Member
Join Date: Apr 2012
Location: Sweden
Old 01-06-2015 , 10:03   Re: BrainBread Stats
Reply With Quote #9

Quote:
Originally Posted by tousif View Post
is this plugin consists reset data or clear old one and start new For admins or server modretors from game
It doesn't clear any old data on your player.lvl. But I can make a checker if there is one, so it saves the data on the SQL.

And I updated the plugin again, fixed some minor bugs.
__________________
JonnyBoy0719 is offline
Send a message via Skype™ to JonnyBoy0719
JonnyBoy0719
Member
Join Date: Apr 2012
Location: Sweden
Old 01-09-2015 , 02:10   Re: BrainBread Stats
Reply With Quote #10

Updated -- v2.0
Made a lot of changes when I was working on the ranking for the plugin, will insert the rest of the ranking system so it will have a functional /top10 with a menu.
__________________
JonnyBoy0719 is offline
Send a message via Skype™ to JonnyBoy0719
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:54.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode