Project

csstats

0.0
No commit activity in last 3 years
No release in over 3 years
Gem which handle csstats.dat file generated by CSX module in AMX Mod X (http://www.amxmodx.org/)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0

Runtime

~> 3.5
 Project Readme

CSstats

Gem which handle csstats.dat file generated by CSX module in AMX Mod X (https://www.amxmodx.org)

Gem Version Coverage Status

Installation

Add this line to your application's Gemfile:

  gem 'csstats'

Usage

require 'csstats'

stats = CSstats.new(path: 'csstats.dat')
stats.players.find(2).nick

You can set max_players option if you need to get specified number of players.

stats = CSstats.new(path: 'csstats.dat', max_players: 15)
stats.players.count
 # => 15

You can get player information by specified name.

stats = CSstats.new(path: 'csstats.dat')
player_stats = stats.players.find_by(nick: 'my-super-nick')

puts player_stats.kills
  # => 3

Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:

  • Ruby 2.4.0
  • Ruby 2.5.0
  • Ruby 2.6.0

Copyright

Copyright (c) 2013-2019 Justas Palumickas. See LICENSE for details.