搜索
查看: 1959|回复: 3

关于get_user_wstats命令的数据来源?

[复制链接]
发表于 2008-8-20 12:31:00 | 显示全部楼层 |阅读模式 来自 四川宜宾
Description
get_user_wstats - Gets stats from given weapon index. Syntax
get_user_wstats ( index, wpnindex, stats[8], bodyhits[8] ) Type
Native Notes
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
* 7 - score


这个是取武器的统计数据的命令,在stas_logging.amxx中被使用并在日志文件中记录,此记录被用来作为PS排行榜的部分统计数据(如命中率、暴头率)的基准。
我想问的是,这个数据,是从什么地方获取的,应该不是直接从日志文件中获取的,比如说kills、headshots等,而这些数据是否能够更改统计规则,比如说某些特殊ID(如NOSXE)不被统计!我的意思是NOSXE杀人和被杀都不统计,且要保证暴头率准确!
发表于 2008-8-20 14:34:46 | 显示全部楼层 来自 广东深圳

回复: 关于get_user_wstats命令的数据来源?

应该是csx模块的..

[php]
static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param */
{
int index = params[1];
CHECK_PLAYERRANGE(index);
int weapon = params[2];
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
  MF_LogError(amx, AMX_ERR_NATIVE, "Invalid weapon id %d", weapon);
  return 0;
}
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
if (pPlayer->weapons[weapon].shots){
  cell *cpStats = MF_GetAmxAddr(amx,params[3]);
  cell *cpBodyHits = MF_GetAmxAddr(amx,params[4]);
  CPlayer::PlayerWeapon* stats = &pPlayer->weapons[weapon];
  cpStats[0] = stats->kills;
  cpStats[1] = stats->deaths;
  cpStats[2] = stats->hs;
  cpStats[3] = stats->tks;
  cpStats[4] = stats->shots;
  cpStats[5] = stats->hits;
  cpStats[6] = stats->damage;
  for(int i = 1; i < 8; ++i)
   cpBodyHits = stats->bodyHits;
  return 1;
}
return 0;
}
[/php]
回复

使用道具 举报

 楼主| 发表于 2008-8-20 19:06:05 | 显示全部楼层 来自 四川宜宾

回复: 关于get_user_wstats命令的数据来源?

关键是能不能通过什么方法来控制这个数据!
回复

使用道具 举报

发表于 2008-9-13 09:29:00 | 显示全部楼层 来自 江苏连云港
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表