PDA

View Full Version : Csstats RANK to *.htm per hour (Kindzhon from China)


kindzhon0
07-16-2004, 05:35
This cs-htm.amx can convert csstats Rank to *.htm per hour, like 1:00,2:00,3:00.......

And you can set "amx_csstatshtm dir&filename " in server.cfg ,just as:

amx_csstatshtm  "addons/amxx/custom/csstats27015"
amx_csstatshtm  "../../bbs/csstats27016"

default dir&filename is "addons/amxx/custom/csstats27015.htm"

And,you can use .htm in WEB or MOTD in CS. :P

This is test :

http://61.144.228.61/csstats27015.htm

-=STN=- MaGe
07-16-2004, 07:06
ill test this now, just see what it is lol

kindzhon0
07-16-2004, 07:48
ill test this now, just see what it is lol

u can see here...hehe..
:lol:
http://61.144.228.61/csstats27015.htm

Johnny got his gun
07-16-2004, 08:34
Please, instead of hardcoding paths (addons/amxx/custom/csstats) use get_customdir(name[],len)

kindzhon0
07-16-2004, 12:36
Please, instead of hardcoding paths (addons/amxx/custom/csstats) use get_customdir(name[],len)

That's just a default set, you can change it .


use

amx_csstatshtm "dir&filename "

in server.cfg or amx.cfg

kindzhon0
07-18-2004, 12:39
Why here can not find out my plugin? :cry: :cry:

http://www.amxmodx.org/compiler.php

kingpin
07-18-2004, 12:40
Why here can not find out my plugin? :cry: :cry:

http://www.amxmodx.org/compiler.php

thats just a compiler look in the plugins section.

kindzhon0
07-18-2004, 13:10
:shock: ĦĦstill can't understand.... :?: :?:

kingpin
07-18-2004, 13:22
on the main page there is another link called plugin check there. the compiler is there to compile plugin only.

kindzhon0
07-20-2004, 00:50
on the main page there is another link called plugin check there. the compiler is there to compile plugin only.

this is just on the main page link called .plugin ,press ".plugin",
link is http://www.amxmodx.org/compiler.php

and show this:

Choose a mod and category below, or a plugin name to search for.


Plugin Name Author Mod Category Karma Score
Warcraft 3 Frozen Throne (AND tr... pimp daddy Fun Stuff Useful 4.43
Plugin: PS Rank PsychoStats v2.0... cgountanis Statistical Useful 3.75


7678 plugin compiles to date.
This tool by: David "BAILOPAN" Anderson.

here i can't find my plugin..... :oops:

Nick
07-20-2004, 13:45
Thats becuase it hasen't been approved by a moderator.

kindzhon0
07-23-2004, 03:24
Thats becuase it hasen't been approved by a moderator.
:shock:

When can be approved by a moderator? :?:

Johnny got his gun
07-23-2004, 04:15
Rules


Do not post plugins that already exist or have been written already.

Make the source code available.

Do not post destructive or offensive plugins.

Only post plugins you have written.

Do not put "Plugin:" in the title. That is added upon approval.

Don't use amxmod.inc - use amxmodx.inc instead

Don't use constant pathes - use get_basedir (...) instead

(no constant paths)

SidLuke
07-23-2004, 11:35
you must use something like this or similar :

new szTemp[64]
get_customdir(szTemp,63)
add(szTemp,63,"/csstats")
register_cvar("amx_csstatshtm",szTemp)

MeTaL69
07-23-2004, 14:17
Is this surpose to create the .htm file from the .dat file or r we surpose to create it?

Is this only going to work, if u have the web & game on the same server?
As I dont!!

kindzhon0
08-07-2004, 05:39
Hi:

My name es Pablo from Argentina.
The reason I'm writing is because I'm using the plugin you made, and I want
to
Ask you if it's possible to change the time in witch it refreshes the htm
file.
Now it's done by the hour, I want to change it to make refreshes every 10
minutes.

One of the reasons I want to do this is because I want to add some other
stats to the htm file (stats like, killing ratio, efficiency, hit boxes, etc
) and now I have to wait 1 hour to see the changes.

Thanks a lot in advance, I found your plugin really interesting, and a very
smart solution considering that without it I should be using something like
mysql to collect
Stats.

Thanks again,

Pablo.

kindzhon0
08-07-2004, 05:48
The reason I'm writing is because I'm using the plugin you made, and I want
to
Ask you if it's possible to change the time in witch it refreshes the htm
file.
Now it's done by the hour, I want to change it to make refreshes every 10
minutes.



Frist,Thanks a lot.

You can change here:

set_task(60.0,"htm",0,"",0,"b")
}

public htm() {
new mmins[6]
get_time("%M",mmins,5)
new mins = str_to_num(mmins)
get_cvar_string("amx_csstatshtm",g_fileToSavehtm,63)
format(g_fileToSavehtm, 63, "%s.htm",g_fileToSavehtm)
if (mins == 0) writehtm(g_fileToSavehtm)
return PLUGIN_CONTINUE


to

set_task(600.0,"htm",0,"",0,"b")
}

public htm() {
get_cvar_string("amx_csstatshtm",g_fileToSavehtm,63)
format(g_fileToSavehtm, 63, "%s.htm",g_fileToSavehtm)
writehtm(g_fileToSavehtm)
return PLUGIN_CONTINUE

it will be work....


set_task(600.0,"htm",0,"",0,"b")
^^^
600S=10mins ...

knubbe
08-08-2004, 11:59
Do u think its possible to modify it so it inserts the stats into a MySQL table instead of create a html file of it??

It would be nice :)

kindzhon0
01-16-2005, 21:16
>How can another column can be added after the
>headshots , so it can reflect the differences the
>players have between with the one ranked above him.so
>he can easily understand and see the killings he has
>to make in order to gain one position.

In cs_htm.sma ,there is two line ,you can change,one for headline,another for data.

pos += copy(g_Buffer[pos],2047-pos,"</style></head><body><table><tr class=^"header^"><td>Rank</td><td>name</td><td>Kills</td><td>Death</td><td>hits</td><td>Shots</td><td>Headshots</td></tr>")

format(g_Buffer,2047,"<trclass=^"%s^"><td>%d.</td><td>%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td></tr>",state,a+1,name,stats[0],stats[1],stats[5],stats[4],stats[2])


hope this can help you.

Proach
01-17-2005, 10:02
hmm
does this one also works with csstatsX ?

kindzhon0
01-17-2005, 20:41
yes,it can.

Proach
01-18-2005, 04:06
gonna give it a try then..

OMG
Its working Very Happy
this is so cool thx m8
1 more question.. is it possible to also add eff and acc?
tx
Proach

aslo
when I try to compile the sma I get this

/home/users/amxmodx/tmp/phphFYs2b.sma(49) : warning 217: loose indentation
/home/users/amxmodx/tmp/phphFYs2b.sma(50) : warning 217: loose indentation
/home/users/amxmodx/tmp/phphFYs2b.sma(59) : warning 217: loose indentation

does this effect the plugin?

kindzhon0
01-24-2005, 00:08
just warning,not error,

no problem... :roll:

Proach
01-24-2005, 01:31
heheh last question ! :P
is it possible to show this stats on a website that is not on the same server ?

randalthor
05-24-2005, 12:55
PLLLZ HELP

When this plugin tries to write to file i get the following error

Native Error in "write_file on line 54 (plugin "cs-htm.amxx")
Debug Trace =>
[0] Line 54, File "/home/users/amxmodx/public_html/forums/files/cs-htm.sma
[1] Line 41, File "/home/users/amxmodx/public_html/forums/files/cs-htm.sma


WHY???

TiMbErLaNd
05-24-2005, 19:20
heheh last question ! :P
is it possible to show this stats on a website that is not on the same server ?

this was also posted by another person, do we have an answer?
thanks for yor time.

Upp3r
07-10-2005, 10:19
very interesting plugin. but i need 2 things to know that it really works.
1) what line should be added that you could activate(save) it manually?
2) and what i should write int this command i still dont understand.amx_csstatshtm "addons/amxx/custom/csstats27015" ???
source to the csstats.dat? or this is the file that stats should be saved in html?
thanks for your trouble

randalthor
07-10-2005, 12:32
about 2 i can help you....

this i have added to the server.cfg in /cstrike/ folder....

amx_csstatshtmĦĦ "addons/amxx/custom/csstats27015"

(you will have to create the folders amxx/custom if you are using amxmodx, or change the folder to save)

it works... hope ull have success with it....

Upp3r
07-10-2005, 12:47
thank you very much for your trouble:)

devicenull
07-15-2005, 12:54
Two things:
My suggestion is to change the default value "addons/amxx/custom/csstats" to "addons/amxmodx/custom/csstats", or you will get people complaining.

Second, use require_module(csstats)

p00r
09-30-2005, 14:12
it says error(209)invalid expression ,assumed zero

p00r
10-01-2005, 10:13
hello

Ramphex
01-18-2006, 00:07
can someone fix the plugin? or is there another version of it?

teame06
01-18-2006, 00:48
No warranty that it works or not... it was only compiled with no errors.

mats
02-17-2006, 13:50
its working but i want that the stats update every 15min. what do i have to change?

[FMJ]Animal Mother
02-28-2006, 21:23
its working but i want that the stats update every 15min. what do i have to change?

Look in cs-htm.sma for these lines...

new mmins[6]
get_time("%M",mmins,5)
new mins = str_to_num(mmins)
get_cvar_string("amx_csstatshtm",g_fileToSavehtm,63)
format(g_fileToSavehtm, 63, "%s.htm",g_fileToSavehtm)
if (mins == 0) writehtm(g_fileToSavehtm)
return PLUGIN_CONTINUE

The 6th line down...
if (mins == 0) writehtm(g_fileToSavehtm)

Is looking for the time with 0 minutes, which means the top of the hour, 1pm, 2pm, 3pm, 4pm and so on. And that's when it writes the .htm file.

If you want it to write the .htm file every 15 minutes, just add 3 lines to make it look like this...

new mmins[6]
get_time("%M",mmins,5)
new mins = str_to_num(mmins)
get_cvar_string("amx_csstatshtm",g_fileToSavehtm,63)
format(g_fileToSavehtm, 63, "%s.htm",g_fileToSavehtm)
if (mins == 0) writehtm(g_fileToSavehtm)
if (mins == 15) writehtm(g_fileToSavehtm)
if (mins == 30) writehtm(g_fileToSavehtm)
if (mins == 45) writehtm(g_fileToSavehtm)
return PLUGIN_CONTINUE

Now it will write the .htm file every hour on the hour and every 15 minutes also.

Just make sure you compile again and upload to your server.

[FMJ]Animal Mother
02-28-2006, 22:36
I'm running this plugin on a rented server from Clanservers.com.

It runs fine and writes the .htm file just like it should, but since it's a remote rented server, I can't seem to do anything with the file. I can't link to it from our website, and I can't get the plugin to write to a remote FTP server.

Is there any way around this???

TIA

wolf414
03-25-2006, 17:04
I would like to know the same thing. how do we have it automaticly update to our websites every hour??

GHW_Chronic
03-25-2006, 18:50
you can't you'de have to use psychostats of something of the sort.

[WbOF]LuZiFeR
03-30-2006, 18:15
I've got the problem, that no file is written....

No errors, no debug information....

Path is set in server.cfg

some suggestions ? :)

supersky
07-14-2006, 11:58
Gook work! A plugin from China! Hoh, I will try this plugin by all means.
Chinese:好样的!

But I wonder why does the compiler show the warning "loose intentation"?

qsush
07-14-2006, 15:25
LuZiFeR']I've got the problem, that no file is written....

No errors, no debug information....

Path is set in server.cfg

some suggestions ? :)
i have the some problem, but i havent´t set a path in server.cfg.
but i think it must save the stats to the default path.

raz3tec
07-28-2006, 20:14
Hi!
I just woundered how i should type in if i want to save it in My Documents?
And if it is possible to send the file to an ftp account? Or how should i do with MySQL and PshycoStats? :?:

sweat
08-04-2006, 19:55
Csstats RANK to *.txt per 1/4 hour (Ali from England)

Don't click get plugin!

This has only been edited by me to output to .txt file & to update every 15mins, not 1 hour.
However, the motd.txt can only hold 1.5kb, so is likely not able to show the whole top15 table (approx 8 and a bit by my estimate, but I'm not currently running a server so not sure).
To compensate, I've freed space by making an external style_rank.css sheet.
This sheet will have to be served by you, or you can use Geocities for free (which I do).
The plugin will not work well unless you edit the CAPITALS at the bottom of this code to your own needs.

INSTRUCTIONS:
1) Click 'Get Source' and download 'style_rank.txt'.
2) Download and extract the zip file.
3) Put the style_rank.css file on a webserver. (geocities will serve it for free).
4) Edit the source. Near the bottom is a link to the 'style_rank.css' file, you'll need to edit the link so it works.
5) Compile the plugin and add 'cs-txt.amxx' to your plugins.ini file.
6) Add the line: amx_csstatstxt "motd"
to your amxx.cfg

Warning: the plugin will replace any existing motd.txt file you have in the 'cstrike' folder, so back it up if its of any value.

GJ Kindzhon making an excellent plugin!

pgweu
08-11-2006, 18:19
Im new here and i need help i've tried to compile this plugin but i get the error:

Plugin failed to compile! Please try contacting the author.
Welcome to the AMX Mod X 1.75-300 Compiler.Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(48) : error 020: invalid symbol name ""/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(49) : warning 217: loose indentation/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(50) : warning 217: loose indentation/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(57) : error 029: invalid expression, assumed zero/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(57) : error 029: invalid expression, assumed zero/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(58) : error 029: invalid expression, assumed zero/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(59) : warning 217: loose indentation/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(60) : error 029: invalid expression, assumed zero/home/groups/alliedmodders/forums/files/1/6/7/5/991.attach(70) : warning 204: symbol is assigned a value that is never used: ""5 Errors.Could not locate output file /home/groups/amxmodx/public_html/compiled3/991.amx (compile failed).Could someone plaese tell me whats wrong. :cry:

sweat
08-12-2006, 12:24
Theres something wrong with the code. I'm no coder so I can't fix it, but the one I posted works. If you want I can post an html version aswell but can't be arsed now!

marko
08-17-2006, 01:22
hey i cant get the plugin only the source
is ther a way u could send it to me or another place i can dl it from??

SweatyBanana
08-17-2006, 02:04
He used a pre-defined symbol name, so I had to change it..

Plus this plugin is 2 years old...

sweat
08-17-2006, 14:33
GJ Sweaty Banana, this is your plugin, but I've cleaned Kindzhon's HTML code a fair bit and set it to update the page every 15mins.

-This html page is to be served by the same server the game runs on.
-If you do not have web server software already, I suggest Abyss Web Server X1, its free and easy to use. WebMod by DJeyl is alsov. good.
-Make sure your web server is installed in the cstrike directory, as the plugin can't create an html file outside the cstrike folder.

I've also attached an motd.txt file that will auto-direct clients to this page (you need to edit the link).
The cs-txt.sma has also been updated with Sweaty Banana's code!

dtox
09-17-2006, 21:24
Anyway to make this so that It runs once a week? Running it once an hour I get alot of lag. Thanks.

WuTang
09-23-2006, 21:54
Anyway to have this automatically upload to an ftp server?

Skullzor
10-08-2006, 04:24
He used a pre-defined symbol name, so I had to change it..

Plus this plugin is 2 years old...

Do I need the style_rank.css for this?

sweat
10-09-2006, 05:31
Sweaty Banana was talking bout kindzhons script, which is now outdated. I 've now updated my 2 versions of the plugin using banana's new script and my own html code which is also better than kindzhon's. The style_rank.css is only needed for my .txt version of the plugin, all other versions on this thread have style inside the .sma file. I would use the .html version if I were you, the motd.txt version is really a backup/quick way to show your rank list without installing web server software on your server machine.

farazsuleman
11-17-2006, 19:02
Kindzhon.126.com Rank Listbody{font-family:Arial,sans-serif;font-size:12px;color:#FFCC99;background-color:#000000;margin-left:8px;margin-top:3px}.header{background-color:#9C0000;}.one{background-color:#310000;}.two{background-color:#630000;}RanknameKillsDeathhitsShotsHea dshots1.time bomb18981903768648000593Update time: 11.18.2006- 05:00:22 only one player rank show.....
18 player playing in my server but this plugin showing only one player rank stats plz help me

zapille
04-07-2007, 08:56
can someone make this plugin with command like amx_refreshstats and add amx_task and it will refresh 1,2,3 or 4 times in a day, this shouldn't make any lags on server

matiaslp
04-09-2007, 08:39
i can't download the plugin

compiler isn't working

puta.mp3
05-29-2007, 12:22
i can't download the plugin

compiler isn't working

Me too =(

It's a nice plugin...

Please, i dont speak english very nice...

If someone has this plugin, send to me: [email protected]

See you.

ditmesteam
02-18-2010, 07:26
Do you know the way to auto upload*.htm to website, then players can see top1-top100?