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

CS:S Litle Rank System


Post New Thread Reply   
 
Thread Tools Display Modes
waiflih
Junior Member
Join Date: Feb 2007
Old 11-21-2008 , 16:44   Re: CS:S Litle Rank System
Reply With Quote #21

Quote:
Originally Posted by martin.developer View Post
Hello, this plugin is good, but on my server ranks write in DB only if client disconnect.
Anybody help me, what can I do to write ranks on round end ?
Many thanks
Quote:
Originally Posted by graczu View Post
On Evry player disconnect statistics are saving in Database.
(for me it's good, becouse players dont saying /rank, /rank on evry round they play )

read first!!

and, graczu, if you're still active, can you add the option to save the rank by name and not by steamid?
waiflih is offline
graczu
Senior Member
Join Date: Mar 2006
Old 12-04-2008 , 22:25   Re: CS:S Litle Rank System
Reply With Quote #22

Offf, i will try on some free time update this plugin. Im now sick so i dont need go to job, so i have some free time, and my server players will be happy if they will have stats on the server.

I will try to add some options like time after that stat of nonactive player is deleting, etc..
__________________
graczu is offline
graczu
Senior Member
Join Date: Mar 2006
Old 12-06-2008 , 11:36   Re: CS:S Litle Rank System
Reply With Quote #23

Updated

Edit: ops sorry for post spam , dont see that my post was last
__________________
graczu is offline
foohey
Member
Join Date: Dec 2008
Location: France
Old 12-20-2008 , 15:15   Re: CS:S Litle Rank System
Reply With Quote #24

hi, I have just modified for display rank at all player
it displays like: <nick> stats: 0 kills | 3 death | ...

Code:
public SQLGetMyRank(Handle:owner, Handle:hndl, const String:error[], any:client){
    if(hndl == INVALID_HANDLE)
    {
        LogError(error);
        PrintToServer("Last Connect SQL Error: %s", error);
        return;
    }
    
    decl String:name[64];
    decl RAkills;
    decl RAdeaths;
    decl RAheadshots;
    decl RAsucsides;
    decl RAnkNum;
    
    if(SQL_FetchRow(hndl)) 
    {
        SQL_FetchString(hndl, 0, name, sizeof(name));
        RAkills=SQL_FetchInt(hndl,1);
        RAdeaths=SQL_FetchInt(hndl,2);
        RAheadshots=SQL_FetchInt(hndl,3);
        RAsucsides=SQL_FetchInt(hndl,4);
        RAnkNum=RAkills/RAdeaths;
        decl String:buffer[512];
        Format(buffer, sizeof(buffer), "SELECT rank_id FROM css_rank WHERE (kills/deaths) >= '%i'", RAnkNum);
        if(DEBUG == 1){
            PrintToServer("DEBUG: SQLGetMyRank (%s)", buffer);
        }
        SQL_TQuery(db, SQLShowRank, buffer, client);
        PrintToChatAll("%c%s's stats: Tués: %i | Morts: %i | Headshots: %i | Suicides: %i", GREEN, name, RAkills, RAdeaths, RAheadshots, RAsucsides);
    } else {
        PrintToChat(client, "%cYour rank is not avlilable!", GREEN);
    }
}
but in SQLShowRank, I can not change for display like:
<nick> is ranked 20/160

Im french, sorry for my bad english
Thanks in advance.
foohey is offline
Faks
Junior Member
Join Date: Feb 2009
Old 02-28-2009 , 11:07   Re: CS:S Litle Rank System
Reply With Quote #25

work like charm i think we must make it better and i next versions add more functions to be more advanced but author
Faks is offline
graczu
Senior Member
Join Date: Mar 2006
Old 03-12-2009 , 07:19   Re: CS:S Litle Rank System
Reply With Quote #26

Quote:
Originally Posted by foohey View Post
hi, I have just modified for display rank at all player
it displays like: <nick> stats: 0 kills | 3 death | ...

Code:
public SQLGetMyRank(Handle:owner, Handle:hndl, const String:error[], any:client){
    if(hndl == INVALID_HANDLE)
    {
        LogError(error);
        PrintToServer("Last Connect SQL Error: %s", error);
        return;
    }
    
    decl String:name[64];
    decl RAkills;
    decl RAdeaths;
    decl RAheadshots;
    decl RAsucsides;
    decl RAnkNum;
    
    if(SQL_FetchRow(hndl)) 
    {
        SQL_FetchString(hndl, 0, name, sizeof(name));
        RAkills=SQL_FetchInt(hndl,1);
        RAdeaths=SQL_FetchInt(hndl,2);
        RAheadshots=SQL_FetchInt(hndl,3);
        RAsucsides=SQL_FetchInt(hndl,4);
        RAnkNum=RAkills/RAdeaths;
        decl String:buffer[512];
        Format(buffer, sizeof(buffer), "SELECT rank_id FROM css_rank WHERE (kills/deaths) >= '%i'", RAnkNum);
        if(DEBUG == 1){
            PrintToServer("DEBUG: SQLGetMyRank (%s)", buffer);
        }
        SQL_TQuery(db, SQLShowRank, buffer, client);
        PrintToChatAll("%c%s's stats: Tués: %i | Morts: %i | Headshots: %i | Suicides: %i", GREEN, name, RAkills, RAdeaths, RAheadshots, RAsucsides);
    } else {
        PrintToChat(client, "%cYour rank is not avlilable!", GREEN);
    }
}
but in SQLShowRank, I can not change for display like:
<nick> is ranked 20/160

Im french, sorry for my bad english
Thanks in advance.
If somone have long nick it's display bad.

Update, Some litle Fixes in SQL and SQL Queries, Litle Change in Display TOP 10.
__________________
graczu is offline
k2k1n9
Junior Member
Join Date: Mar 2009
Old 03-20-2009 , 19:35   Re: CS:S Litle Rank System
Reply With Quote #27

Hi,

I have some problems because i don't know how the databases.cfg have to look like.

I tried something lik that:

Code:
"Databases"
{
 "driver_default"  "mysql"
 
 "default"
 {
  "driver"   "default"
  "host"    "localhost"
  "database"   "sourcemod"
  "user"    "root"
  "pass"    ""
  //"timeout"   "0"
  //"port"   "0"
 }
 
 "storage-local"
 {
  "driver"   "sqlite"
  "database"   "sourcemod-local"
 }
 "cssrank"
 {
  "driver"   "default"
  "host"    "127.0.0.1"
  "database"   "axerank"
  "user"    "root"
  "pass"    "hallo"
  //"timeout"   "0"
  "port"    "3306"
 }
}
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;
Is this the way it works or is something wrong with it.

Other Questions:
*Must the port be forwarded in my firewall?
*When is the information I typed in for the "user" and "password" line needed and how?
*What's the difference between a selfmade username and "root" as username?

Please help me..

k2k1n9
k2k1n9 is offline
Zuben
Junior Member
Join Date: May 2009
Old 05-06-2009 , 13:10   Re: CS:S Litle Rank System
Reply With Quote #28

Hello , I have problem when I write /rank I see this :

Code:
Rank System is now not avilable
Help please , Thank you
Zuben is offline
MrCapion
Junior Member
Join Date: Feb 2009
Old 05-30-2009 , 09:19   Re: CS:S Litle Rank System
Reply With Quote #29

Quote:
Originally Posted by Zuben View Post
Hello , I have problem when I write /rank I see this :

Code:
Rank System is now not avilable
Help please , Thank you

yir.. thats all I get too ???
__________________
*If it works, Dont fix it*
MrCapion is offline
Send a message via ICQ to MrCapion Send a message via MSN to MrCapion
genzo
New Member
Join Date: Jun 2009
Old 06-16-2009 , 10:04   Re: CS:S Litle Rank System
Reply With Quote #30

Good job!

How trample kills bots in statistic? What need doing?

Sorry my English.
genzo is offline
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 10:35.


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