AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   CS:S Litle Rank System (https://forums.alliedmods.net/showthread.php?t=60093)

graczu 08-26-2007 16:24

CS:S Litle Rank System
 
1 Attachment(s)
Simple Counter Strike Source Player's Ranking
(How it Work's: TOP10 and RANK is DEATHS/KILLS/PLAY_TIME ASC)

Features:

- /rank
- /top10
- /headhunters

/rank :: Simple showing player Rank, and stats Kills, Deaths, Headshot's, Sucside's
/top10 :: Showing Player's TOP with LIMIT 10 based ON Kills/Deaths DESC
/headhunters :: Showing TOP Player's Headshoter's and Played Time

There is an option that you can set stats delete of nonactive Player's (If stats older than X days, they are deleted)

How To:

Add to your: database.cfg (addons/sourcemod/configs)

Code:

        "cssrank"
        {
                "driver"                        "default"
                "host"                                "127.0.0.1"
                "database"                        "database_name"
                "user"                                "database_user"
                "pass"                                "PASSWORD"
                //"timeout"                        "0"
                "port"                        "3306"
        }

In your database you need run a query:

Code:

CREATE TABLE `css_rank`(
`rank_id` int(64) NOT NULL auto_increment,
`steamId` varchar(32) NOT NULL default '',
`nick` varchar(128) NOT NULL default '',
`kills` int(12) NOT NULL default '0',
`deaths` int(12) NOT NULL default '0',
`headshots` int(12) NOT NULL default '0',
`sucsides` int(12) NOT NULL default '0',
`last_active` int(12) NOT NULL default '0',
`played_time` int(12) NOT NULL default '0',
PRIMARY KEY  (`rank_id`)) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

Changelog:
Updates (last: 12.03.2009 (DD.MM.YYYY))
* SQL Fixes
* Query Fixes
* Display Changes
Updates (last: 1228581207):
* New: OLD STATS deleting
* Update TABLE on UTF8 and Setting NAMES to UTF8 on DatabaseConnect
* Changes in Database Connect
* New: Added "/headhunters"
* New: played_time, we will creat most active players TOP
* New: last_active ON this we will base is this player stats not to old.. (we dont want have BIG MySQL DataBase)
in future, maybe i will creat archive table, that there we will be have those player's, and they will be come back from archive when they will connect.
* Anti Flood Protection (new userFlood[64];)
* New announce message on: onClientPutInServer(client)
* WWW sie Cvar ("sm_lrcss_www",)
* PHP site nick protection:
[ ReplaceString(name, sizeof(name), "'", "");
ReplaceString(name, sizeof(name), "<", "");
ReplaceString(name, sizeof(name), "\"", "");
]
* Changed SQL_Query on SQL_TQuery Functions, Helper: - dalto
* Added Debug Mode for MySQL Queries: new DEBUG = 0;
* Added: new String:steamIdSave[64][255]; for Player Disconnect useage in: SQL_TQuery
* Added: if(hndl == INVALID_HANDLE) function check in all: SQL_TQuery


Thanks for people that help me:
- dalto (http://forums.alliedmods.net/member.php?u=29575) (SQL BUG)

Fredd 08-26-2007 18:50

Re: CS:S Litle Rank System
 
Very Cool ;]

Rebell 08-27-2007 00:45

Re: CS:S Litle Rank System
 
Please add a SQLite version !

cya

RaideR 10-07-2007 21:35

Re: CS:S Litle Rank System
 
I did everything like said.
1. Copied css_rank_en.smx to \cstrike\addons\sourcemod\plugins\
2. Added the following to \cstrike\addons\sourcemod\configs\databases.c fg
CREATE TABLE `css_rank`(
`rank_id` int(64) NOT NULL auto_increment,
`steamId` varchar(255) NOT NULL default '',
`nick` varchar(255) NOT NULL default '',
`kills` int(12) NOT NULL default '0',
`deaths` int(12) NOT NULL default '0',
`headshots` int(12) NOT NULL default '0',
`sucsides` int(12) NOT NULL default '0',
PRIMARY KEY (`rank_id`));

But it doesn't works, console says:
[SM] Native SQL Query reported: Invalid database handled 0 Error 4
[SM] Debug mode is not enabled for

Then I switched on the debug mode and it said:
[SM] Could not toggle debug mode on plugin css_rank_en.smx
[SM] Plugin returned error: Plugin is not runnable

HELP Please!!!

graczu 11-09-2007 09:12

Re: CS:S Litle Rank System
 
Quote:

Originally Posted by RaideR (Post 539833)
I did everything like said.
1. Copied css_rank_en.smx to \cstrike\addons\sourcemod\plugins\
2. Added the following to \cstrike\addons\sourcemod\configs\databases.c fg
CREATE TABLE `css_rank`(
`rank_id` int(64) NOT NULL auto_increment,
`steamId` varchar(255) NOT NULL default '',
`nick` varchar(255) NOT NULL default '',
`kills` int(12) NOT NULL default '0',
`deaths` int(12) NOT NULL default '0',
`headshots` int(12) NOT NULL default '0',
`sucsides` int(12) NOT NULL default '0',
PRIMARY KEY (`rank_id`));

But it doesn't works, console says:
[SM] Native SQL Query reported: Invalid database handled 0 Error 4
[SM] Debug mode is not enabled for

Then I switched on the debug mode and it said:
[SM] Could not toggle debug mode on plugin css_rank_en.smx
[SM] Plugin returned error: Plugin is not runnable

HELP Please!!!

^^

You need have a MySQL Database
Configure your MySQL base in your "configs/databases.cfg" (Addres, login, password, databasename)
Code:

        "default"
        {
                "driver"                        "mysql"
                "host"                                "localhost"
                "database"                        "sourcemod"
                "user"                                "myaccount"
                "pass"                                "mypassword"
        }

example like sql admins:
http://wiki.alliedmods.net/SQL_Admins_%28SourceMod%29

Execute the sql code:

Code:

CREATE TABLE `css_rank`(
`rank_id` int(64) NOT NULL auto_increment,
`steamId` varchar(255) NOT NULL default '',
`nick` varchar(255) NOT NULL default '',
`kills` int(12) NOT NULL default '0',
`deaths` int(12) NOT NULL default '0',
`headshots` int(12) NOT NULL default '0',
`sucsides` int(12) NOT NULL default '0',
PRIMARY KEY  (`rank_id`));

In your database, and then you will be able to use this plugin.
(From phpmyadmin or shell)

Good luck Gordon :)

http://en.wikipedia.org/wiki/MySQL

RaideR 11-25-2007 06:30

Re: CS:S Litle Rank System
 
Ok, did like you said, but now when type top10 there only one person who is the 1st. The same is on the site. What I did wrong?

sphinx 11-25-2007 23:00

Re: CS:S Litle Rank System
 
1 Attachment(s)
can we have a top10 list with yellow player's name and without rank number before K/D? see attachment.

RaideR 11-26-2007 18:35

Re: CS:S Litle Rank System
 
Please someone help me with the problem in my post 6

sphinx 11-26-2007 23:58

Re: CS:S Litle Rank System
 
Quote:

Originally Posted by RaideR (Post 557223)
Please someone help me with the problem in my post 6

did you modified the plugin? give it a try to the version attached to my #7 post.

RaideR 11-27-2007 02:03

Re: CS:S Litle Rank System
 
Quote:

Originally Posted by sphinx (Post 557307)
did you modified the plugin? give it a try to the version attached to my #8 post.

No nothing was modified. OK, I will try today


All times are GMT -4. The time now is 15:09.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.