Raised This Month: $51 Target: $400
 12% 

CS:S Litle Rank System


Post New Thread Reply   
 
Thread Tools Display Modes
Author
graczu
Senior Member
Join Date: Mar 2006
Plugin ID:
163
Plugin Version:
1.3
Plugin Category:
Statistical
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    It's a MySQL Ranking system plugin + PHP site script.
    Old 08-26-2007 , 16:24   CS:S Litle Rank System
    Reply With Quote #1

    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)
    Attached Files
    File Type: sp Get Plugin or Get Source (css_rank.sp - 25345 views - 16.0 KB)
    __________________

    Last edited by graczu; 03-12-2009 at 08:46.
    graczu is offline
    Fredd
    Veteran Member
    Join Date: Jul 2007
    Old 08-26-2007 , 18:50   Re: CS:S Litle Rank System
    Reply With Quote #2

    Very Cool ;]
    __________________
    Need a private coder? AMXX, SourceMOD, MMS? PM me!
    Fredd is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 08-27-2007 , 00:45   Re: CS:S Litle Rank System
    Reply With Quote #3

    Please add a SQLite version !

    cya
    __________________
    Rebell is offline
    RaideR
    Member
    Join Date: Oct 2007
    Location: Russia
    Old 10-07-2007 , 21:35   Re: CS:S Litle Rank System
    Reply With Quote #4

    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!!!
    RaideR is offline
    Send a message via ICQ to RaideR
    graczu
    Senior Member
    Join Date: Mar 2006
    Old 11-09-2007 , 09:12   Re: CS:S Litle Rank System
    Reply With Quote #5

    Quote:
    Originally Posted by RaideR View Post
    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
    __________________
    graczu is offline
    RaideR
    Member
    Join Date: Oct 2007
    Location: Russia
    Old 11-25-2007 , 06:30   Re: CS:S Litle Rank System
    Reply With Quote #6

    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?
    __________________
    Cheaters must DIE!!!
    RaideR is offline
    Send a message via ICQ to RaideR
    sphinx
    Senior Member
    Join Date: Jun 2005
    Location: E.U. / localhost
    Old 11-25-2007 , 23:00   Re: CS:S Litle Rank System
    Reply With Quote #7

    can we have a top10 list with yellow player's name and without rank number before K/D? see attachment.
    Attached Files
    File Type: sp Get Plugin or Get Source (css_rank2_en.sp - 2671 views - 12.9 KB)

    Last edited by sphinx; 11-26-2007 at 00:44.
    sphinx is offline
    RaideR
    Member
    Join Date: Oct 2007
    Location: Russia
    Old 11-26-2007 , 18:35   Re: CS:S Litle Rank System
    Reply With Quote #8

    Please someone help me with the problem in my post 6
    __________________
    Cheaters must DIE!!!
    RaideR is offline
    Send a message via ICQ to RaideR
    sphinx
    Senior Member
    Join Date: Jun 2005
    Location: E.U. / localhost
    Old 11-26-2007 , 23:58   Re: CS:S Litle Rank System
    Reply With Quote #9

    Quote:
    Originally Posted by RaideR View Post
    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.

    Last edited by sphinx; 12-12-2007 at 10:46.
    sphinx is offline
    RaideR
    Member
    Join Date: Oct 2007
    Location: Russia
    Old 11-27-2007 , 02:03   Re: CS:S Litle Rank System
    Reply With Quote #10

    Quote:
    Originally Posted by sphinx View Post
    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
    __________________
    Cheaters must DIE!!!
    RaideR is offline
    Send a message via ICQ to RaideR
    Reply



    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 18:48.


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