Ejemplo n.º 1
0
def server_map(event, ip, port, timestamp):
    curmap = Stats.getServerMap(ip, port)

    players = Stats.getPlayers(ip, port)
    for cur in players:
        players[cur].savePlayer(ip, port, curmap)

    Stats.setServerMap(ip, port, event.map)
Ejemplo n.º 2
0
def player_attacked(event,ip,port,timestamp):
	attacker = Stats.getPlayer(event.attacker_steamid,ip,port)

	attacker.checkName(event.attacker_name)

	curWeapon = attacker.getWeapon(event.weapon)
        curWeapon.damage += event.damage
Ejemplo n.º 3
0
def player_killed(event,ip,port,timestamp):
	attacker = Stats.getPlayer(event.attacker_steamid,ip,port)
	victim = Stats.getPlayer(event.victim_steamid,ip,port)

	attacker.checkName(event.attacker_name)
	victim.checkName(event.victim_name)

	attacker.kills += 1
	victim.deaths += 1

        curWeapon = attacker.getWeapon(event.weapon)
	curWeapon.kills += 1

	vs = attacker.getVictim(victim.steamid)
	vs.kills += 1

	if event.headshot == 1:
		curWeapon.headshots += 1
		vs.headshots += 1
Ejemplo n.º 4
0
def player_weaponstats(event,ip,port,timestamp):
	player = Stats.getPlayer(event.steamid,ip,port)

	player.checkName(event.name)

	curWeapon = player.getWeapon(event.weapon)
	
	curWeapon.kills += event.kills
	curWeapon.headshots += event.headshots
	curWeapon.damage += event.damage
	curWeapon.tks += event.tks
Ejemplo n.º 5
0
def player_triggered(event, ip, port, timestamp):
    player = Stats.getPlayer(event.steamid, ip, port)
    curevent = player.getEvent(event.event)

    curevent.trigger_count += 1
Ejemplo n.º 6
0
def player_joinedteam(event, ip, port, timestamp):
    player = Stats.getPlayer(event.steamid, ip, port)

    player.getTeam(event.newteam).join_count += 1
Ejemplo n.º 7
0
def player_connect(event,ip,port,timestamp):
	player = Stats.getPlayer(event.steamid,ip,port)

	player.checkName(event.name)
	player.ip = event.ip
	player.lastconnect = time.time()
Ejemplo n.º 8
0
def player_suicide(event,ip,port,timestamp):
	player = Stats.getPlayer(event.steamid,ip,port)

	player.checkName(event.name)
	player.suicides += 1