***
Currently Karma only supports MySQL
Karma is a system that I'm developing to allow players give each other praise or smite.
Roadmap:
- add translations
- add a addon that will smite players every time they get muted, gaged, silenced, kicked, etc.
For those whom want it, The MySQL Creation Script:
Code:
delimiter $$
CREATE DATABASE `servers` /*!40100 DEFAULT CHARACTER SET latin1 */$$
delimiter $$
CREATE TABLE `karma` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`accountid` int(11) NOT NULL,
`recent_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`positive_karma` int(11) NOT NULL DEFAULT '0',
`negative_karma` int(11) NOT NULL DEFAULT '0',
`positive_karma_expiry` bigint(20) NOT NULL DEFAULT '0',
`negative_karma_expiry` bigint(20) NOT NULL DEFAULT '0',
`last_seen` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`accountid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci$$
I have not tested the creation script inside the plugin which should automatically create your database. You are probably best to use the creation script above to create the database.
You should go into karma.sp and change some variables to suit yourself.
Stuff in
BOLD that you may want to change in karma.sp / karma_addon_handler.sp:
#define DATABASENAME "
servers"
#define DATABASENAME_TABLE "
karma"
if your running CSGO, then change:
#define GGAME_CSGO
0
to
#define GGAME_CSGO
1
CSGO server owners should use our version of colors.inc included in our zip file
Convars in your servers.cfg:
// based on number of seconds
// 3600 = 1 hour
// 300 = 5 minutes
karma_wait_time 3600
karma_wait_time is applied to a player after they !smite or !praise someone, and make them wait that long before they can do it again.
NOTE: You will need to compile this yourself.