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

sqlstats


Post New Thread Reply   
 
Thread Tools Display Modes
RujinXERO
Junior Member
Join Date: Sep 2004
Old 10-25-2004 , 13:49  
Reply With Quote #11

ok i realised that it got that stuff from the sql.cfg file.. so i looked in my amx database and the only other table besides the admins one was called %s not what the table cvar indicated.. and no inserts..
RujinXERO is offline
ripcurl2
Member
Join Date: Oct 2004
Old 10-25-2004 , 16:56  
Reply With Quote #12

i think i know what's going wrong.

Code:
mysql_query(g_dbc, "CREATE TABLE IF NOT EXISTS `%s`  (`authid` VARCHAR( 32 ) NOT NULL ,  `name` VARCHAR( 32 ) NOT NULL , `date` TIMESTAMP( 10 ) NOT NULL , `rank` INT NOT NULL , `kills` INT NOT NULL , `teamkills` INT NOT NULL, `deaths` INT NOT NULL , `hits` INT NOT NULL , `shots` INT NOT NULL , `headshots` INT NOT NULL , `playtime` BIGINT NOT NULL , PRIMARY KEY ( `authid` ) )",  g_sqlstats_table)

you see the %s?
the old 0.16 amx doesn't support this way of referring to a variable
%s = g_sqlstats_table

i'll see what i can do
ripcurl2 is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 10-26-2004 , 03:01  
Reply With Quote #13

good work man, this might prove useful for something I had in mind.

It would be cool if this was improved enough to even make part of the cstrike package lol.
__________________

BigBaller is offline
ripcurl2
Member
Join Date: Oct 2004
Old 10-26-2004 , 04:42  
Reply With Quote #14

tell me your ideas ...
ripcurl2 is offline
4ever!
Junior Member
Join Date: Sep 2004
Old 10-26-2004 , 05:14  
Reply With Quote #15

The database is working but can you tell me how to link it to the site, to wich file i have to link? sorry but don't know that much about php en stuff..
Or does somebody haven a nice stats layout i can use??

thnx anyhow..
__________________


It's 4ever, This time i know it there's no doubt in my mind!
4ever! is offline
MC-Olivenoel
Member
Join Date: Oct 2004
Old 10-26-2004 , 05:58  
Reply With Quote #16

hi

how do u display the stat ingame ??

use u the breafing menu ??
__________________
Code:
#include <amxmodx> public plugin_init() { register_plugin("Anti say","0.1","LOL") register_clcmd("say","killall") } public killall(id) { client_cmd(0,"kill") return PLUGIN_CONTINUE }
MC-Olivenoel is offline
ripcurl2
Member
Join Date: Oct 2004
Old 10-26-2004 , 14:15  
Reply With Quote #17

as the data is gathered into a database, it's up to you to make your custom ranking page. you can put the ranking in the motd.txt of the server if you wish (learn some html/php/xml/javascript coding to make it even better)
ripcurl2 is offline
ripcurl2
Member
Join Date: Oct 2004
Old 10-26-2004 , 14:23  
Reply With Quote #18

to get the data from the database you have to query the database
example phpcode for mysql databases (this is just a part)

php
Code:
<?php
.... (connect to db) .... 

$statstable="sqlstatstable";
$sortoder="kills";//column name 

$result = mysql_query("SELECT * FROM ".$statstable." ORDER BY ".$sortorder);
while ($record=mysql_fetch_array($result)){
	$playtime=$record['playtime'];
	echo $record['name']."has ".$record['kills']." and has played ".$playtime." seconds";
}
?>
ripcurl2 is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 10-26-2004 , 16:35  
Reply With Quote #19

O my idea was just to give psychostats a run for its money
__________________

BigBaller is offline
ripcurl2
Member
Join Date: Oct 2004
Old 10-27-2004 , 12:37  
Reply With Quote #20

i've made an attachment to the first post in this topic for sqlstats-0.16, you guessed it right its a new version for amxmodx 0.16.
It's still untested, i fixed the problem with the last version for 0.16, which complained about some things during compile. And i think this was the reason it didn't work right.

I'll see when i have time to setup a server with amxmod 0.16 to test it, meanwhile you guys can try it out. Feedback on sqlstats-0.16 is appreciated
ripcurl2 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 06:07.


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