Raised This Month: $32 Target: $400
 8% 

SoD Player Stats


Post New Thread Reply   
 
Thread Tools Display Modes
Xp3r7
SourceMod Donor
Join Date: Jul 2006
Old 10-14-2010 , 15:55   Re: SoD Player Stats
Reply With Quote #711

Quote:
Originally Posted by Bacardi View Post
We have running this plugin OB-Css, 30player server, OS Linux...
mms 1.8.3 & SM 1.3.4
No crash or slow map change
Same here but Im Windows and 32 slots.
__________________
Xp3r7 is offline
Send a message via MSN to Xp3r7
Pialx
SourceMod Donor
Join Date: Oct 2010
Old 10-17-2010 , 12:23   Re: SoD Player Stats
Reply With Quote #712

Hi,

I use this plugin on my server, i tried to modify it for include the reset rank fonction.


The changes on the file sodstats.sp:

- Add in the section: public Action:ConCmd_Say(userid, args)

Code:
 if(strcmp(text[startidx], "resetrank", false) == 0 || strcmp(text[startidx], "!resetrank", false) == 0)
 {
 Reset_Rank(userid);
 }

- Add a new section:
Code:
Reset_Rank(const userid)
{
 new String:name[255];
 GetClientName(userid, name, sizeof(name));
 
 // Make SQL-safe
 ReplaceString(name, sizeof(name), "'", "");
 
 // resetrank
 g_kills[userid]       = 0;
 g_deaths[userid]      = 0;
 g_shots[userid]       = 0;
 g_hits[userid]        = 0;
 g_score[userid]       = 0;
 g_time_played[userid] = 0;
 g_headshots[userid]   = 0;
 PrintToChat(userid, "Votre rank a été réinitialisé %s", name);
 
 SavePlayer(userid);
 return 0;
}
I'm not a programmer, i tryed to use existing code, it's certainly not optimized but it's functionnal.

The source file is attached.

(Sorry for mistakes, English is not my mother tongue.)
Attached Files
File Type: sp Get Plugin or Get Source (sodstats.sp - 297 views - 14.3 KB)
Pialx is offline
zombieescape2010
Junior Member
Join Date: Sep 2010
Old 10-18-2010 , 11:39   Re: SoD Player Stats
Reply With Quote #713

Commands

sm_stats_reset - Resets player stats.

sm_stats_purge [#days] - Removes players from database who haven't connected for [#days] days.

Please help me, This commands doesn't work by me.


Sorry for my bad english.
zombieescape2010 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-19-2010 , 06:05   Re: SoD Player Stats
Reply With Quote #714

Admins with flag "i"(config) or "z"(root) can use those two commands.

Type command in your own console, what it say ?
sm_stats_reset
sm_stats_purge 7


Do you get work chat commands rank, statsme, session ?
Bacardi is offline
zombieescape2010
Junior Member
Join Date: Sep 2010
Old 10-19-2010 , 14:35   Re: SoD Player Stats
Reply With Quote #715

Okay, thanks.

I have wirte this comannds as a rcon command.
zombieescape2010 is offline
zombieescape2010
Junior Member
Join Date: Sep 2010
Old 10-20-2010 , 17:42   Re: SoD Player Stats
Reply With Quote #716

So, I have me give admin right with Sourcemod.

The reset command works, but the "sm_stats_purge 7" dosen't work.
The player count are the same as before.

I need your help again.
zombieescape2010 is offline
Devil Within
Junior Member
Join Date: Oct 2010
Old 10-21-2010 , 04:03   Re: SoD Player Stats
Reply With Quote #717

Where do the ranks save, im going from a home PC to a dedi server and i need to transfer the ranks, help please

Thanks
Devil Within is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-21-2010 , 07:35   Re: SoD Player Stats
Reply With Quote #718

Quote:
Originally Posted by Devil Within View Post
Where do the ranks save, im going from a home PC to a dedi server and i need to transfer the ranks, help please

Thanks
...addons\sourcemod\data\sqlite\sourcemod-local.sq3

Can you use *.sq3 files ?? I have no clue about sql things.
__________________
Do not Private Message @me
Bacardi is offline
u235
New Member
Join Date: Jul 2008
Old 10-27-2010 , 23:04   Re: SoD Player Stats
Reply With Quote #719

Quote:
Originally Posted by Bacardi View Post
...addons\sourcemod\data\sqlite\sourcemod-local.sq3

Can you use *.sq3 files ?? I have no clue about sql things.
Yep. If you're into GUI's or not familiar with SQL, this firefox plugin is pretty useful http://code.google.com/p/sqlite-manager/. Of course, there's the sqlite3 tool in linux if you prefer cli tools.
u235 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 10-28-2010 , 07:43   Re: SoD Player Stats
Reply With Quote #720

Quote:
Originally Posted by u235 View Post
Yep. If you're into GUI's or not familiar with SQL, this firefox plugin is pretty useful http://code.google.com/p/sqlite-manager/. Of course, there's the sqlite3 tool in linux if you prefer cli tools.
Good, and there already other post have show program #701

http://sourceforge.net/projects/sqlitebrowser/

Time to little practising ^^
Bacardi 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 12:06.


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