AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Addon: Web Stats v0.2.5 (https://forums.alliedmods.net/showthread.php?t=109286)

PomanoB 11-15-2009 04:54

[ZP] Addon: Web Stats v0.2.5
 
3 Attachment(s)
[ZP] Web Stats 0.2.5

Description
Statistic Plugin for Zombie Plague 4.3
Includes Ammo Bank
  • Players Stats
  • Weapon Stats
  • Zombie Classes Stats
  • Maps Stats
  • Other
Modules
  • sqlx
  • fakemeta
  • hamasndwitch
Admin Commands
zp_ammo <name|#userid|@Z|@H|@A> <count>
Give ammo to
@Z - All zombie
@H - All human
@A - All players
Client commands
say /hp
Display information about you killer
say /me
Display you information (kills ,infect, damage, last hit)
say /rank [name|ip|steam_id]
Display you/player rank
say /stats [name|ip|steam_id]
say /rankstats [name|ip|steam_id]
Display you/player detail stats
say /top[number]
Display 15 top players, ending with the specified value [number]
say /donate <target> <count>
Present <count> ammo to <target>
CVAR's

zp_stats_host - Database host
zp_stats_db - database
zp_stats_user - MySQL user
zp_stats_password - MySQL password

zp_stats_allow_hp - Allow client command say /hp
zp_stats_allow_me - Allow client command say /me
zp_stats_show_hit - If 1, display zombie hp when player hit
zp_stats_allow_donate - Allow client command say /donate

zp_stats_max_inactive_day - Max inactive day to players in top
zp_stats_min_ammo - Min ammo to players in top
zp_stats_min_online - Min online to players in top

zp_stats_store_class - If 1, players zombie class save in database
zp_stats_store_ammo - If 1, players ammo save in database

zp_stats_limit_ammo - Limits for maximum ammo, 0 - disable

zp_stats_show_adv - If 1, show info about client command's
zp_stats_adv_time - Time to show adv.

zp_stats_show_best_players - Show the best players in round (default 1)
zp_stats_show_rank_on_round_start - Show rank(rank change) on round start (default 1)

zp_stats_auth_type
1 - Steam ID
2 - IP Address
3 - Nickname
above - Steam ID/IP Adress

default - 4
zp_stats_ignore_nick - Tag, which does not take calculate statistics (default "[unreg]")

Defines
Uncomment "//#define ZP_STATS_DEBUG" to detail log

Installation
Copy the 'web/zp_stats' directory to your website
Edit 'web/zp_stats/inc/config.php'
Use the file 'web/zp_stats.sql' to initialize the database

Copy the 'addons' directory to your 'cstrike' folder
Add the plugin name to addons/amxmodx/configs/plugins-zplague.ini
Edit 'configs/zp_web_stats.cfg'

You must install extension 'php5-xsl'
Debian:
Code:

aptitude install php5-xsl
Version History
0.1.0 - First public release
0.2.0 - Global update, change plugin name
0.2.1 - Optimization
0.2.2 - Fixed small bag
0.2.3 - Fixed charset problem
0.2.4 - Added cvar "zp_stats_allow_donate"
0.2.5 - Fixed zp_class_store_ammo bug (thx MmikiM)

Credits
maslyak
CHyCMyMpNk
a.aqua
crazyeffect - translate
ramiax - Lithuanian language translation
MmikiM - Polish translate

Demonstration - http://www.klan-hub.ru/zp_stats/

#8 SickneSS 11-15-2009 06:06

Re: [ZP] Web Stats
 
Nice:mrgreen:

soolt 11-15-2009 08:07

Re: [ZP] Web Stats
 
Next generation of zp, very nice :)

arnaldo_silva 11-15-2009 08:21

Re: [ZP] Web Stats
 
Nice +karma ;)

xbatista 11-15-2009 08:47

Re: [ZP] Web Stats
 
Good job! I was waiting for someone release a simple example of plugin and it's PHP code which I need ,thats good example .

PomanoB 11-15-2009 13:01

Re: [ZP] Web Stats
 
Thanks)

pirvu 11-15-2009 14:50

Re: [ZP] Web Stats
 
Good job .
Try use switches instead of else and ifs?

PHP Code:


    
if (get_pcvar_num(g_CvarAuthType) == 1)
    {
        
copy(whereis,9,"steam_id")
        
copy(uniqid,31,g_UserAuthID[id])
    }
    else
    if (
get_pcvar_num(g_CvarAuthType) == 2)
    {
        
copy(whereis,9,"ip")
        
copy(uniqid,31,g_UserIP[id])
    }
    else
    if (
get_pcvar_num(g_CvarAuthType) == 3)
    {
        
copy(whereis,9,"nick")
        
copy(uniqid,31,g_UserName[id])
    } 

--->

PHP Code:


    
switch(get_pcvar_num(g_CvarAuthType) ) 


PomanoB 11-15-2009 15:14

Re: [ZP] Web Stats
 
I don't like switch :D

AntiBots 11-15-2009 18:27

Re: [ZP] Web Stats
 
Yeah.. is the same...

The only diference that get_pcvar_*
Is called one time..
And if Value is 3. The be called 3 times.

vnish 11-16-2009 11:25

Re: [ZP] Web Stats
 
PomanoB, Привет можешь такую же стату замутить только для биохазарда. Версии 1.93 ?


All times are GMT -4. The time now is 23:50.

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