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

Player Status in DB


Post New Thread Reply   
 
Thread Tools Display Modes
krevedko13
New Member
Join Date: Jan 2012
Old 01-15-2012 , 11:15   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #101

First of all: SORRY for my English.

I'm try to setup this plugin for my CS 1.6 server:
Code:
v1.6.3.7/Stdio 4883

AMXMODX v1.8.1.3746, MetaMod v1.19p32
1) I setup normal statsx for saving gamers stats in csstats.dat, it function normally, file <cs>/cstrike/addons/amxmodx/data/csstats.dat contains records
2) get & install psd_007-3.amxx, plugin loaded normally
3) edit sql.cfg:

Code:
amx_sql_host    "192.168.1.8" // IP of mysql-server computer
amx_sql_user    "root"
amx_sql_pass    "password"
amx_sql_db        "csstats" // name of stats base
amx_sql_table    "admins"
amx_sql_type    "mysql"
psd_tbname        "statustable" // i get it from this topic
4) create table "csstats"
5) restart server & ... get nothing table "csstats" is empty

Where i missed ?

I'am try to execute "amx_psd_initialize", but get:

Code:
20:15:45 addons/amxmodx/data/csstats.dat
         [PSD] Initialize Failed...
In source code i find line 144 - plugin can't execute "rename_file".
Folder <cs>/cstrike/addons/amxmodx/data/ has permissions 0755, 0777 not fix this too.

=========

Offtopic: who has idea for way to parsing csstats.dat by some script-language like PHP ?
http://wiki.amxmodx.org/Stats_File_F...28AMX_Mod_X%29
http://forums.alliedmods.net/showthread.php?t=98061

Last edited by krevedko13; 01-15-2012 at 13:42.
krevedko13 is offline
eHardy
New Member
Join Date: Feb 2012
Old 09-05-2012 , 03:46   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #102

who tested it on windows 7?
eHardy is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 01-05-2013 , 10:52   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #103

Sorry is that statsx.amxx for MySQL with additional feature (player status)??
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
harethecoder
New Member
Join Date: Jan 2014
Old 01-03-2014 , 14:29   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #104

I have spent some time to repair public init_status() function

and

it doesn't crash the server!
It was all about get_time() function.

All you have to do is to find this code:
Code:
//initialize all player status
public init_status()
{
	new datfile[MAX_LENGTH+10],datfile2[MAX_LENGTH+20]
	formatex(datfile,MAX_LENGTH+9,"%s/csstats.dat",g_datadir)
	get_time("%Y%M%D",datfile2,MAX_LENGTH+19)
	formatex(datfile2,MAX_LENGTH+19,"%s/csstats-%s.bak",g_datadir,datfile2)
	server_print(datfile)
	if(file_exists(datfile))
	{
		if(rename_file(datfile,datfile2,1))
		{
			server_print("[PSD] Initialize Successful, and backup csstats.dat now.")		
			server_print("[PSD] Please reloading server...")
		}else{
			server_print("[PSD] Initialize Failed...")
		}
	}else{
		server_print("[PSD] Can't Initializing... Sequence Failed...")
	}
	return PLUGIN_CONTINUE
}
and change it with this one:
Code:
//initialize all player status for backup
public init_status()
{
	new datfile[MAX_LENGTH+10],datfile2[MAX_LENGTH+20],thedate[MAX_LENGTH]
	formatex(datfile,MAX_LENGTH+9,"%s/csstats.dat",g_datadir) 			//prepare csstats.dat
	get_time("%Y-%m-%d",thedate,MAX_LENGTH) 					//get server date year-month-day
	/* 
	now prepare backup-file-name datadir/csstats-thedate.bak 
	i.e. your_datadir/csstats-2014-01-01.bak
	*/
	formatex(datfile2,MAX_LENGTH+19,"%s/csstats-%s.bak",g_datadir,thedate)	//prepare backup file
	if(file_exists(datfile))							//check if csstats.dat exists
	{
		if(rename_file(datfile,datfile2,1))					//rename csstats.dat to backup-file.bak
		{
			server_print("[PSD] Initialize Successful, and backup csstats.dat now.")		
			server_print("[PSD] Please reloading server...")
		}else{
			server_print("[PSD] Initialize Failed...")
		}
	}else{
		server_print("[PSD] Can't Initializing... Sequence Failed...")
	}
	return PLUGIN_CONTINUE
}
As you will check this function, you can see that, it only makes backup file!
However, working function is better than crashing one
harethecoder is offline
sandeep
Member
Join Date: Dec 2012
Location: india/gujarat/bharuch
Old 01-07-2014 , 11:08   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #105

How to use this plugins on hlds server
sandeep is offline
Send a message via Skype™ to sandeep
navaneet31
Junior Member
Join Date: Dec 2012
Old 11-28-2015 , 08:14   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #106

Quote:
Originally Posted by bug View Post
Code:
[AMXX] Plugin "psd_007-3.amxx" failed to load: Module/Library Class "xstats" required for plugin.  Check modules.ini.
Code:
Currently loaded modules:
name                    version     author               status     
Fun                     1.8.0.3660  AMX Mod X Dev Team   running    
Engine                  1.8.0.3660  AMX Mod X Dev Team   running    
FakeMeta                1.8.0.3660  AMX Mod X Dev Team   running    
MySQL                   1.8.0.3660  AMX Mod X Dev Team   running    
CStrike                 1.50        AMX Mod X Dev Team   running    
CSX                     1.50        AMX Mod X Dev Team   running    
Ham Sandwich            1.8.0.3660  AMX Mod X Dev Team   running
Code:
psd_007-3.amxx
;statsx.amxx        ; stats on death or round end (CSX Module required!)
;miscstats.amxx        ; bunch of events announcement for Counter-Strike
;stats_logging.amxx    ; weapons stats logging (CSX Module required!)
???? what?

Why i get this error?
enable this statsx.amxx
navaneet31 is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 03-22-2020 , 08:43   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #107

v0.8 Now Testing.


__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 03-28-2020 at 07:33.
+ARUKARI- is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 03-29-2020 , 01:21   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #108

0.8 commited in github.
https://github.com/AoiKagase/AMXMODX...er/psd_008.sma
https://github.com/AoiKagase/AMXMODX...ster/csx_stats
__________________
GitHub
SteamWishlist

六四天安門事件

Last edited by +ARUKARI-; 03-29-2020 at 08:35.
+ARUKARI- is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 04-02-2020 , 22:16   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #109

Thank you for the update!
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-02-2020 , 22:22   Re: Player Status in DB (sqlstats Lite)
Reply With Quote #110

Quote:
Originally Posted by JocAnis View Post
Thank you for the update!
But, Not completed yet.
If you are a alliedmodders donor, please cooperate in the donor thread.
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- 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 19:53.


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