added csx module
This commit is contained in:
61
dlls/csx/plugins/include/csstats.inc
Executable file
61
dlls/csx/plugins/include/csstats.inc
Executable file
@ -0,0 +1,61 @@
|
||||
|
||||
#if defined _csstats_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _csstats_included
|
||||
|
||||
/* Gets stats from given weapon index. If wpnindex is 0
|
||||
* then the stats are from all weapons. If weapon has not been used function
|
||||
* returns 0 in other case 1. Fields in stats are:
|
||||
* 0 - kills
|
||||
* 1 - deaths
|
||||
* 2 - headshots
|
||||
* 3 - teamkilling
|
||||
* 4 - shots
|
||||
* 5 - hits
|
||||
* 6 - damage
|
||||
|
||||
* For body hits fields see amxconst.inc. */
|
||||
native get_user_wstats(index,wpnindex,stats[8],bodyhits[8]);
|
||||
|
||||
/* Gets round stats from given weapon index.*/
|
||||
native get_user_wrstats(index,wpnindex,stats[8],bodyhits[8]);
|
||||
|
||||
/* Gets overall stats which are stored in file on server
|
||||
* and updated on every respawn or user disconnect.
|
||||
* Function returns the position in stats by diff. kills to deaths. */
|
||||
native get_user_stats(index,stats[8],bodyhits[8]);
|
||||
|
||||
/* Gets round stats of player. */
|
||||
native get_user_rstats(index,stats[8],bodyhits[8]);
|
||||
|
||||
/* Gets stats with which user have killed/hurt his victim. If victim is 0
|
||||
* then stats are from all victims. If victim has not been hurt, function
|
||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||
native get_user_vstats(index,victim,stats[8],bodyhits[8],wpnname[]="",len=0);
|
||||
|
||||
/* Gets stats with which user have been killed/hurt. If killer is 0
|
||||
* then stats are from all attacks. If killer has not hurt user, function
|
||||
* returns 0 in other case 1. User stats are reset on his respawn. */
|
||||
native get_user_astats(index,wpnindex,stats[8],bodyhits[8],wpnname[]="",len=0);
|
||||
|
||||
/* Resets life, weapon, victims and attackers user stats. */
|
||||
native reset_user_wstats(index);
|
||||
|
||||
/* Gets overall stats which stored in stats.dat file in amx folder
|
||||
* and updated on every mapchange or user disconnect.
|
||||
* Function returns next index of stats entry or 0 if no more exists. */
|
||||
native get_stats(index,stats[8],bodyhits[8],name[],len);
|
||||
|
||||
/* Returns number of all entries in stats. */
|
||||
native get_statsnum();
|
||||
|
||||
/*
|
||||
* new stats:
|
||||
* 0 - total defusions
|
||||
* 1 - bomb defused
|
||||
* 2 - bomb plants
|
||||
* 3 - bomb explosions
|
||||
*/
|
||||
native get_user_stats2(index,stats[4]);
|
||||
native get_stats2(index,stats[4]);
|
59
dlls/csx/plugins/include/csx.inc
Executable file
59
dlls/csx/plugins/include/csx.inc
Executable file
@ -0,0 +1,59 @@
|
||||
/* CSX functions
|
||||
*
|
||||
* (c) 2004, SidLuke
|
||||
* This file is provided as is (no warranties).
|
||||
*/
|
||||
|
||||
#if defined _csx_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _csx_included
|
||||
|
||||
#include <csstats>
|
||||
|
||||
/*
|
||||
* Forwards
|
||||
*/
|
||||
|
||||
/* Function is called after player to player attacks ,
|
||||
* if players were damaged by teammate TA is set to 1 */
|
||||
forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA);
|
||||
|
||||
/* Function is called after player death ,
|
||||
* if player was killed by teammate TK is set to 1 */
|
||||
forward client_death(killer,victim,wpnindex,hitplace,TK);
|
||||
|
||||
forward grenade_throw( index,greindex,wId );
|
||||
|
||||
forward bomb_planting(planter);
|
||||
forward bomb_planted(planter);
|
||||
forward bomb_explode(planter,defuser);
|
||||
forward bomb_defusing(defuser);
|
||||
forward bomb_defused(defuser);
|
||||
|
||||
/************* Shared Natives Start ********************************/
|
||||
|
||||
/* Custom Weapon Support */
|
||||
/* function will return index of new weapon */
|
||||
native custom_weapon_add( wpnname[],melee = 0,logname[]="" );
|
||||
/* Function will pass damage done by this custom weapon to stats module and other plugins */
|
||||
native custom_weapon_dmg( weapon, att, vic, damage, hitplace=0 );
|
||||
/* Function will pass info about custom weapon shot to stats module */
|
||||
native custom_weapon_shot( weapon,index ); // weapon id , player id
|
||||
|
||||
/* function will return 1 if true */
|
||||
native xmod_is_melee_wpn(wpnindex);
|
||||
|
||||
/* Returns weapon name. */
|
||||
native xmod_get_wpnname(wpnindex,name[],len);
|
||||
|
||||
/* Returns weapon logname. */
|
||||
native xmod_get_wpnlogname(wpnindex,name[],len);
|
||||
|
||||
/* Returns weapons array size */
|
||||
native xmod_get_maxweapons();
|
||||
|
||||
/* Returns stats array size */
|
||||
native xmod_get_stats_size();
|
||||
|
||||
/************* Shared Natives End ********************************/
|
Reference in New Issue
Block a user