Classement d'informations (fichier .log) dans un tableau

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Classement d'informations (fichier .log) dans un tableau

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 20 juil. 2014, 18:50

Ok, merci pour le boulot que tu as effectué... :)
Bonne journée !

Re: Classement d'informations (fichier .log) dans un tableau

par Elie » 20 juil. 2014, 18:43

Maintenant a toi de te sortir les doigts du cul pour paufiner ca !
Les statistiques des membres :
Quinn : points = 7 kills = 7 headshot = 1 mort = 10
Zane : points = 2 kills = 2 headshot = 0 mort = 7
gK.sn2 : points = 33 kills = 33 headshot = 6 mort = 13
Wayne : points = 12 kills = 9 headshot = 3 mort = 15
Eric : points = 8 kills = 4 headshot = 2 mort = 17
Chet : points = 8 kills = 8 headshot = 5 mort = 10
Vladimir : points = 11 kills = 11 headshot = 1 mort = 12
Dave : points = 9 kills = 7 headshot = 3 mort = 13
Derek : points = 8 kills = 8 headshot = 2 mort = 10
Jeff : points = 6 kills = 5 headshot = 0 mort = 7
sn4GhostGost : points = 29 kills = 29 headshot = 8 mort = 19
Les armes les plus utilisées sont : awp : 64 fois, ak47 : 27 fois, m4a1 : 11 fois, p250 : 10 fois, knife_t : 3 fois, sg556 : 3 fois, hkp2000 : 2 fois, p90 : 2 fois, knife_default_ct : 1 fois,
<?php

	// On met a jour les champs
	function update($joueur, $champ, $nb) {
		
		global $statistiques;
		
		if(!array_key_exists($joueur, $statistiques)) $statistiques[$joueur] = array('points' => 0, 'kills' => 0, 'headshot' => 0, 'mort' => 0); // On vérifie que le joueur est déjà identifié dans le log 'entered the game'
		$statistiques[$joueur][$champ] += $nb;
		
	}
	
	// On simplifie le nom du joueur
	function player($joueur) {
		
		return strip_tags($joueur);	// Une arnaque pour enlever ce qui est contenu entre < et > 
		
	}
		

	$log = file("test.log");
	$statistiques = $armes = array();
	foreach($log as $statInfo) {
		
		$patternHeadshot = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w+) "(\d*\w*)" \(headshot\)#';
		$patternKills = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w+) "(\d*\w*)"#';
		$patternAssists = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (\w*\s*\S*) "([\s\S]*)"#';
		$patternAchat = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (\w*) "(\w*\d*)"#';
		$patternConnexion = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?(?:<>)?" (.+)#';
		
		preg_match("#.*#",$statInfo,$stat);
		if(preg_match("#entered the game#",$statInfo,$stat)) {
			
			preg_match($patternConnexion,$statInfo,$stat);
		
		} elseif(preg_match("#headshot#",$statInfo,$stat)) {
				
			preg_match($patternHeadshot,$statInfo,$stat);
			if(count($stat) > 0) {
				update(player($stat[3]), 'points', 3);	// Le tueur gagne 2 point
				update(player($stat[3]), 'kills', 1);	// Le tueur gagne 1 kill
				update(player($stat[3]), 'headshot', 1);	// Le tueur gagne 1 kill
				update(player($stat[5]), 'mort', 1);	// Le mort gagne 1 mort
			
				$armes[] = $stat[7];
			}

		
		} elseif(preg_match("#killed#",$statInfo,$stat)) {
			
			preg_match($patternKills,$statInfo,$stat);
			if(count($stat) > 0) {
				update(player($stat[3]), 'points', 2);	// Le tueur gagne 2 point
				update(player($stat[3]), 'kills', 1);	// Le tueur gagne 1 kill
				update(player($stat[5]), 'mort', 1);	// Le mort gagne 1 mort
				
				$armes[] = $stat[7];
			}
		
		} elseif(preg_match("#purchased#",$statInfo,$stat)) {
				
			preg_match($patternAchat,$statInfo,$stat);
			// Je sais pas quoi ca sert purchased
			
		} elseif(preg_match("#assisted killing#",$statInfo,$stat)) {
			
			preg_match($patternAssists,$statInfo,$stat);
			if(count($stat) > 0) {
				update(player($stat[3]), 'points', 1);	// L'assistant gagne 1 point
				update(player($stat[5]), 'mort', 1);	// Le mort gagne 1 mort			
			}
			
		}
	}
	
	echo 'Les statistiques des membres :<br />';
	foreach($statistiques as $k => $v) {
		echo '<strong>'.$k.'</strong> : ';
		foreach($v as $key => $value) {
			echo $key.' = '.$value.' ';
		}
		echo '<br />';
	}

	$armes = array_count_values($armes);
	arsort($armes);	
	echo 'Les armes les plus utilisées sont : ';
	foreach($armes as $k => $v) {
		echo $k.' : '.$v.' fois, ';
	}
	
?>
 

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 20 juil. 2014, 17:55

Merci :D
Effectivement, un kill -> 2 pts, un assistance -> 1 pt, un headshot -> 3 pts, mais j'aimerais également compter les morts : quand A tue B -> A a 1 pt, B a un "mort", pour compter combien de fois chaque joueurs est mort, ce qui fait donc 6 éléments, mais l'entrée d'un joueur ne sera utiliser que pour créer un tableau en son nom, dans lequel sera inscrits : kills, headshots, morts, (et éventuellement otages sauvés, bombes désamorcées et bombes amorcés), donc pour au final avoir quelque chose comme ça (principalement) :
$Stats(
[Joueur1] =
[Kills] = 54
[Headshots] = 48 (bonne précision ce joueur !)
[morts] = 9
[Joueur2] =
[Kills] = 45
[Headshots] = 27
[morts] = 16
...)
Enfin bon... quelle méthode devrais-je utiliser afin de parvenir à réaliser un tel tableau (dont les données se caseront automatiquement en fonction du script que j'ai mis plus haut).
Si tu veux obtenir le fichier .log, que j'utilise pour la réalisation de ce projet, afin de m'aider, le voici (presque) dans son intégralité, en tout cas tu as le début et la fin, j'ai retiré un petit bout du milieu (je voulais le mettre en pièce jointe, mais ni l'extension .log, ni l'extension .txt n'est autorisée...) :

L 07/15/2014 - 19:38:21: Log file started (file "logfiles\L192_168_003_100_27015_201407151938_001.log") (game "C:\csgo\lansrv\csgo") (version "5714")
L 07/15/2014 - 19:38:21: server_cvar: "mp_friendlyfire" "1"
L 07/15/2014 - 19:38:21: server_cvar: "mp_timelimit" "60"
L 07/15/2014 - 19:38:21: server_cvar: "mp_roundtime" "2"
L 07/15/2014 - 19:38:21: server_cvar: "sv_alltalk" "1"
L 07/15/2014 - 19:38:21: server_cvar: "mp_limitteams" "0"
L 07/15/2014 - 19:38:21: server_cvar: "sv_alltalk" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_bomb_defused" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_bomb_planted" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_damage_hostage" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_interact_with_hostage" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_killed_enemy_default" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_killed_enemy_factor" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_killed_hostage" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_killed_teammate" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_player_rescued_hostage" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_elimination_bomb_map" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_elimination_hostage_map_t" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_elimination_hostage_map_ct" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_hostage_interaction" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_loser_bonus" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_loser_bonus_consecutive_rounds" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_planted_bomb_but_defused" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_terrorist_win_bomb" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_win_by_defusing_bomb" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_win_by_hostage_rescue" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_win_by_time_running_out_bomb" "0"
L 07/15/2014 - 19:38:21: server_cvar: "cash_team_win_by_time_running_out_hostage" "0"
L 07/15/2014 - 19:38:21: server_cvar: "mp_buy_anywhere" "1"
L 07/15/2014 - 19:38:21: server_cvar: "mp_buy_during_immunity" "1"
L 07/15/2014 - 19:38:21: server_cvar: "mp_freezetime" "0"
L 07/15/2014 - 19:38:21: server_cvar: "mp_roundtime" "10"
L 07/15/2014 - 19:38:21: server_cvar: "mp_timelimit" "10"
L 07/15/2014 - 19:38:21: server_cvar: "sv_alltalk" "1"
L 07/15/2014 - 19:38:21: server_cvar: "sv_deadtalk" "1"
L 07/15/2014 - 19:38:47: "gK.sn2<2><STEAM_1:1:84443486><>" connected, address ""
L 07/15/2014 - 19:38:47: World triggered "Round_Start"
L 07/15/2014 - 19:39:10: "gK.sn2<2><STEAM_1:1:84443486><>" entered the game
L 07/15/2014 - 19:39:15: "gK.sn2<2><STEAM_1:1:84443486><Unassigned>" triggered "clantag" (value "")
L 07/15/2014 - 19:39:18: "gK.sn2<2><STEAM_1:1:84443486>" switched from team <Unassigned> to <CT>
L 07/15/2014 - 19:39:18: "Derek<3><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Derek<3><BOT>" switched from team <Unassigned> to <TERRORIST>
L 07/15/2014 - 19:39:18: "Derek<3><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Chet<4><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Chet<4><BOT>" switched from team <Unassigned> to <TERRORIST>
L 07/15/2014 - 19:39:18: "Chet<4><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Quinn<5><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Quinn<5><BOT>" switched from team <Unassigned> to <CT>
L 07/15/2014 - 19:39:18: "Quinn<5><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Eric<6><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Eric<6><BOT>" switched from team <Unassigned> to <CT>
L 07/15/2014 - 19:39:18: World triggered "Game_Commencing"
L 07/15/2014 - 19:39:18: "Eric<6><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "gK.sn2<2><STEAM_1:1:84443486><CT>" triggered "clantag" (value "")
L 07/15/2014 - 19:39:18: "Wayne<7><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Wayne<7><BOT>" switched from team <Unassigned> to <TERRORIST>
L 07/15/2014 - 19:39:18: "Wayne<7><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Jeff<8><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Jeff<8><BOT>" switched from team <Unassigned> to <TERRORIST>
L 07/15/2014 - 19:39:18: "Jeff<8><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Dave<9><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Dave<9><BOT>" switched from team <Unassigned> to <CT>
L 07/15/2014 - 19:39:18: "Dave<9><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Zane<10><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Zane<10><BOT>" switched from team <Unassigned> to <TERRORIST>
L 07/15/2014 - 19:39:18: "Zane<10><BOT><>" entered the game
L 07/15/2014 - 19:39:18: "Vladimir<11><BOT><>" connected, address ""
L 07/15/2014 - 19:39:18: "Vladimir<11><BOT>" switched from team <Unassigned> to <CT>
L 07/15/2014 - 19:39:18: "Vladimir<11><BOT><>" entered the game
L 07/15/2014 - 19:39:19: World triggered "Round_Start"
L 07/15/2014 - 19:39:19: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:39:19: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:39:19: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:39:19: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:39:19: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:39:19: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:39:19: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:39:19: "Jeff<8><BOT><TERRORIST>" purchased "galilar"
L 07/15/2014 - 19:39:19: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:39:19: "Dave<9><BOT><CT>" purchased "deagle"
L 07/15/2014 - 19:39:20: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:39:20: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:39:26: "Quinn<5><BOT><CT>" [1117 -1089 -162] killed "Zane<10><BOT><TERRORIST>" [400 66 -93] with "awp"
L 07/15/2014 - 19:39:29: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:39:29: "Zane<10><BOT><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:39:32: "gK.sn2<2><STEAM_1:1:84443486><CT>" [108 567 236] killed "Wayne<7><BOT><TERRORIST>" [-19 436 48] with "awp"
L 07/15/2014 - 19:39:32: "Eric<6><BOT><CT>" assisted killing "Wayne<7><BOT><TERRORIST>"
L 07/15/2014 - 19:39:35: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:39:41: "Chet<4><BOT><TERRORIST>" [442 1350 -16] killed "Vladimir<11><BOT><CT>" [413 1085 48] with "ak47" (headshot)
L 07/15/2014 - 19:39:43: "gK.sn2<2><STEAM_1:1:84443486><CT>" [-5 1068 131] killed "Chet<4><BOT><TERRORIST>" [493 1364 48] with "awp"
L 07/15/2014 - 19:39:45: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:39:47: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:39:48: "Chet<4><BOT><TERRORIST>" [650 1471 -153] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [602 1137 186] with "ak47" (headshot)
L 07/15/2014 - 19:39:49: "Dave<9><BOT><CT>" [116 851 -16] killed "Zane<10><BOT><TERRORIST>" [340 1069 49] with "m4a1"
L 07/15/2014 - 19:39:50: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:39:50: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:39:52: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:39:53: "Zane<10><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:40:00: "Vladimir<11><BOT><CT>" [1474 593 -159] killed "Chet<4><BOT><TERRORIST>" [1649 1194 -55] with "awp"
L 07/15/2014 - 19:40:03: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:40:06: "Derek<3><BOT><TERRORIST>" [1679 608 -156] killed "Vladimir<11><BOT><CT>" [1281 1113 -72] with "ak47"
L 07/15/2014 - 19:40:10: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:40:10: "gK.sn2<2><STEAM_1:1:84443486><CT>" [1060 -438 -284] killed "Jeff<8><BOT><TERRORIST>" [1394 -349 -209] with "awp"
L 07/15/2014 - 19:40:13: "Jeff<8><BOT><TERRORIST>" purchased "sg556"
L 07/15/2014 - 19:40:13: "Jeff<8><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:40:13: "sn4GhostGost<12><STEAM_1:0:85317409><>" connected, address ""
L 07/15/2014 - 19:40:15: "Wayne<7><BOT><TERRORIST>" [1358 834 -152] killed "Eric<6><BOT><CT>" [992 1268 -76] with "ak47" (headshot)
L 07/15/2014 - 19:40:17: "Quinn<5><BOT><CT>" [708 1326 -154] killed "Wayne<7><BOT><TERRORIST>" [1332 909 -85] with "awp"
L 07/15/2014 - 19:40:18: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:40:19: "gK.sn2<2><STEAM_1:1:84443486><CT>" [1123 -877 -162] killed "Zane<10><BOT><TERRORIST>" [1107 -531 -87] with "p250"
L 07/15/2014 - 19:40:20: "Dave<9><BOT><CT>" [1017 1200 -143] killed "Derek<3><BOT><TERRORIST>" [1399 804 -91] with "m4a1" (headshot)
L 07/15/2014 - 19:40:21: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:40:23: "Jeff<8><BOT><TERRORIST>" [1517 -1263 -134] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [1578 -730 -74] with "sg556"
L 07/15/2014 - 19:40:23: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:40:23: "Zane<10><BOT><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:40:23: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:40:23: "Derek<3><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:40:24: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:40:24: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:40:29: "sn4GhostGost<12><STEAM_1:0:85317409><>" entered the game
L 07/15/2014 - 19:40:29: "gK.sn2<2><STEAM_1:1:84443486><CT>" [311 1198 113] killed "Chet<4><BOT><TERRORIST>" [218 1321 90] with "awp"
L 07/15/2014 - 19:40:31: "Jeff<8><BOT><TERRORIST>" [1522 -1315 -136] killed "Eric<6><BOT><CT>" [525 -257 -91] with "sg556"
L 07/15/2014 - 19:40:33: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:40:34: "Vladimir<11><BOT><CT>" [1000 1263 -139] killed "Derek<3><BOT><TERRORIST>" [673 1436 -88] with "awp"
L 07/15/2014 - 19:40:34: "Dave<9><BOT><CT>" assisted killing "Derek<3><BOT><TERRORIST>"
L 07/15/2014 - 19:40:34: "sn4GhostGost<12><STEAM_1:0:85317409><Unassigned>" triggered "clantag" (value "")
L 07/15/2014 - 19:40:35: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:40:37: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:40:38: "sn4GhostGost<12><STEAM_1:0:85317409>" switched from team <Unassigned> to <TERRORIST>
L 07/15/2014 - 19:40:38: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" triggered "clantag" (value "")
L 07/15/2014 - 19:40:39: "Chet<4><BOT><TERRORIST>" [252 1226 -152] killed "Dave<9><BOT><CT>" [505 1514 -94] with "ak47"
L 07/15/2014 - 19:40:39: "Wayne<7><BOT><TERRORIST>" assisted killing "Dave<9><BOT><CT>"
L 07/15/2014 - 19:40:40: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:40:42: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:40:42: "gK.sn2<2><STEAM_1:1:84443486><CT>" [-19 241 -16] killed "Wayne<7><BOT><TERRORIST>" [610 -494 -91] with "awp" (headshot)
L 07/15/2014 - 19:40:43: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:40:43: "Dave<9><BOT><CT>" purchased "p250"
L 07/15/2014 - 19:40:46: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:40:46: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [585 1614 -157] killed "Vladimir<11><BOT><CT>" [378 1289 -88] with "awp" (headshot)
L 07/15/2014 - 19:40:48: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [629 1602 -157] killed "Quinn<5><BOT><CT>" [530 1333 68] with "awp"
L 07/15/2014 - 19:40:50: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:40:50: "gK.sn2<2><STEAM_1:1:84443486><CT>" [31 1298 26] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [375 1463 -92] with "awp"
L 07/15/2014 - 19:40:51: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:40:53: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:40:53: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:40:54: "gK.sn2<2><STEAM_1:1:84443486><CT>" [192 1288 -16] killed "Chet<4><BOT><TERRORIST>" [43 1810 -75] with "awp"
L 07/15/2014 - 19:40:57: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:40:59: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1556 672 -153] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [983 1496 -65] with "awp" (headshot)
L 07/15/2014 - 19:41:00: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:41:00: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:41:02: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1339 1025 -136] killed "Eric<6><BOT><CT>" [450 1520 -95] with "awp" (headshot)
L 07/15/2014 - 19:41:05: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:41:05: "Eric<6><BOT><CT>" purchased "deagle"
L 07/15/2014 - 19:41:06: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [880 1410 -144] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [904 799 81] with "awp"
L 07/15/2014 - 19:41:07: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:41:07: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:41:08: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [477 1349 -16] killed "Dave<9><BOT><CT>" [32 1197 222] with "awp"
L 07/15/2014 - 19:41:12: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:41:12: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [40 1192 114] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [31 1046 187] with "awp"
L 07/15/2014 - 19:41:13: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:41:13: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:41:15: "Vladimir<11><BOT><CT>" [1406 -1063 -156] killed "Zane<10><BOT><TERRORIST>" [2329 -1325 -92] with "awp"
L 07/15/2014 - 19:41:19: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:41:20: "gK.sn2<2><STEAM_1:1:84443486><CT>" [332 1249 -16] killed "Chet<4><BOT><TERRORIST>" [310 1197 48] with "p250"
L 07/15/2014 - 19:41:23: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:41:28: "Dave<9><BOT><CT>" [215 868 171] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [308 1044 199] with "m4a1"
L 07/15/2014 - 19:41:30: "Chet<4><BOT><TERRORIST>" [118 -236 -145] killed "Eric<6><BOT><CT>" [811 -70 -72] with "ak47" (headshot)
L 07/15/2014 - 19:41:31: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:41:31: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:41:34: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:41:36: "Wayne<7><BOT><TERRORIST>" [1162 -577 -157] killed "Vladimir<11><BOT><CT>" [1024 -460 -88] with "ak47"
L 07/15/2014 - 19:41:39: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:41:46: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [229 279 159] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [479 575 287] with "awp"
L 07/15/2014 - 19:41:46: "Eric<6><BOT><CT>" [2036 -1503 -162] killed "Wayne<7><BOT><TERRORIST>" [1758 -1165 -97] with "m4a1" (headshot)
L 07/15/2014 - 19:41:47: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:41:47: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:41:49: "gK.sn2<2><STEAM_1:1:84443486><CT>" [415 -960 -152] killed "Jeff<8><BOT><TERRORIST>" [1306 -600 -78] with "awp"
L 07/15/2014 - 19:41:49: "Eric<6><BOT><CT>" assisted killing "Jeff<8><BOT><TERRORIST>"
L 07/15/2014 - 19:41:50: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:41:52: "Jeff<8><BOT><TERRORIST>" purchased "sg556"
L 07/15/2014 - 19:41:52: "Jeff<8><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:41:56: "gK.sn2<2><STEAM_1:1:84443486><CT>" [849 -576 -154] killed "Wayne<7><BOT><TERRORIST>" [229 -305 -90] with "awp"
L 07/15/2014 - 19:41:59: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:42:08: "Wayne<7><BOT><TERRORIST>" [-38 1288 -16] killed "Dave<9><BOT><CT>" [-80 882 48] with "ak47"
L 07/15/2014 - 19:42:11: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:42:11: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1651 1073 -122] killed "Quinn<5><BOT><CT>" [1481 880 -77] with "awp"
L 07/15/2014 - 19:42:14: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:42:20: "gK.sn2<2><STEAM_1:1:84443486><CT>" [41 1074 131] killed "Wayne<7><BOT><TERRORIST>" [274 1125 187] with "p250"
L 07/15/2014 - 19:42:23: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [654 -23 -152] killed "Eric<6><BOT><CT>" [592 -225 -82] with "awp"
L 07/15/2014 - 19:42:24: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:42:24: "Wayne<7><BOT><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:42:25: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [629 -132 -148] killed "Quinn<5><BOT><CT>" [717 -905 -91] with "awp"
L 07/15/2014 - 19:42:26: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:42:28: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:42:38: "Dave<9><BOT><CT>" [798 482 -72] killed "Chet<4><BOT><TERRORIST>" [1205 339 40] with "m4a1" (headshot)
L 07/15/2014 - 19:42:38: "Dave<9><BOT><CT>" [798 482 -72] killed "Derek<3><BOT><TERRORIST>" [1140 381 40] with "m4a1" (headshot)
L 07/15/2014 - 19:42:41: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:42:42: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:42:46: "Quinn<5><BOT><CT>" [-57 344 -16] killed "Chet<4><BOT><TERRORIST>" [77 209 90] with "hkp2000" (headshot)
L 07/15/2014 - 19:42:49: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:42:53: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [662 575 -152] killed "Vladimir<11><BOT><CT>" [101 523 -88] with "awp"
L 07/15/2014 - 19:42:55: "Wayne<7><BOT><TERRORIST>" [423 1238 -152] killed "Dave<9><BOT><CT>" [432 835 -88] with "ak47"
L 07/15/2014 - 19:42:56: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:42:58: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:43:01: "Vladimir<11><BOT><CT>" [1867 -2351 -160] killed "Jeff<8><BOT><TERRORIST>" [649 -2216 -73] with "awp"
L 07/15/2014 - 19:43:02: "Chet<4><BOT><TERRORIST>" [589 -523 -156] killed "Eric<6><BOT><CT>" [827 -814 -96] with "ak47" (headshot)
L 07/15/2014 - 19:43:02: "gK.sn2<2><STEAM_1:1:84443486><CT>" [342 191 -152] killed "Derek<3><BOT><TERRORIST>" [356 335 -106] with "p250" (headshot)
L 07/15/2014 - 19:43:04: "Jeff<8><BOT><TERRORIST>" purchased "sg556"
L 07/15/2014 - 19:43:04: "Jeff<8><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:43:05: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:43:05: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:43:05: "Eric<6><BOT><CT>" purchased "deagle"
L 07/15/2014 - 19:43:05: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [653 585 -152] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [97 564 -88] with "awp"
L 07/15/2014 - 19:43:05: "Wayne<7><BOT><TERRORIST>" assisted killing "gK.sn2<2><STEAM_1:1:84443486><CT>"
L 07/15/2014 - 19:43:07: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:43:07: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:43:08: "Wayne<7><BOT><TERRORIST>" [403 1161 -16] killed "Quinn<5><BOT><CT>" [-35 1240 48] with "ak47" (headshot)
L 07/15/2014 - 19:43:10: "Derek<3><BOT><TERRORIST>" [275 -91 -150] killed "Dave<9><BOT><CT>" [488 -340 -96] with "ak47"
L 07/15/2014 - 19:43:12: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:43:13: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:43:20: "gK.sn2<2><STEAM_1:1:84443486><CT>" [-29 155 35] killed "Wayne<7><BOT><TERRORIST>" [67 283 48] with "awp"
L 07/15/2014 - 19:43:22: "Dave<9><BOT><CT>" [374 940 149] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [104 887 235] with "m4a1"
L 07/15/2014 - 19:43:23: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:43:23: "Vladimir<11><BOT><CT>" [1040 -807 -282] killed "Derek<3><BOT><TERRORIST>" [1075 -371 -215] with "awp"
L 07/15/2014 - 19:43:25: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:43:25: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:43:26: "Quinn<5><BOT><CT>" [675 1436 -152] killed "Wayne<7><BOT><TERRORIST>" [1056 1097 -83] with "awp"
L 07/15/2014 - 19:43:27: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [398 155 175] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [629 -478 -90] with "awp"
L 07/15/2014 - 19:43:27: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:43:27: "Derek<3><BOT><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:43:27: "Chet<4><BOT><TERRORIST>" [955 -502 -158] killed "Vladimir<11><BOT><CT>" [1117 -428 -214] with "ak47" (headshot)
L 07/15/2014 - 19:43:28: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:43:28: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:43:29: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:43:30: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1 131 24] killed "Eric<6><BOT><CT>" [172 -456 -76] with "awp"
L 07/15/2014 - 19:43:31: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:43:33: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:43:33: "Eric<6><BOT><CT>" purchased "p250"
L 07/15/2014 - 19:43:37: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [901 58 -155] killed "Vladimir<11><BOT><CT>" [993 431 192] with "awp" (headshot)
L 07/15/2014 - 19:43:41: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1329 257 -154] killed "Quinn<5><BOT><CT>" [1881 793 -90] with "awp" (headshot)
L 07/15/2014 - 19:43:41: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:43:42: "Derek<3><BOT><TERRORIST>" [165 -525 -136] killed "Dave<9><BOT><CT>" [340 -281 -91] with "ak47"
L 07/15/2014 - 19:43:42: "Wayne<7><BOT><TERRORIST>" [404 957 -152] killed "Eric<6><BOT><CT>" [259 841 -88] with "ak47"
L 07/15/2014 - 19:43:44: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:43:44: "Quinn<5><BOT><CT>" purchased "p250"
L 07/15/2014 - 19:43:46: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:43:46: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:43:46: "Eric<6><BOT><CT>" purchased "deagle"
L 07/15/2014 - 19:43:46: "gK.sn2<2><STEAM_1:1:84443486><CT>" [1013 208 -160] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1001 245 -96] with "knife_default_ct"
L 07/15/2014 - 19:43:49: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:43:49: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:43:51: "gK.sn2<2><STEAM_1:1:84443486><CT>" [756 145 -149] killed "Derek<3><BOT><TERRORIST>" [348 253 -88] with "awp" (headshot)
L 07/15/2014 - 19:43:52: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1087 443 135] killed "Vladimir<11><BOT><CT>" [532 -141 -91] with "awp"
L 07/15/2014 - 19:43:54: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:43:55: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:44:00: "Wayne<7><BOT><TERRORIST>" [414 -293 -158] killed "Eric<6><BOT><CT>" [732 -453 -67] with "ak47"
L 07/15/2014 - 19:44:00: "Jeff<8><BOT><TERRORIST>" assisted killing "Eric<6><BOT><CT>"
L 07/15/2014 - 19:44:03: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:44:04: "gK.sn2<2><STEAM_1:1:84443486><CT>" [1687 498 -157] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1546 660 -40] with "awp"
L 07/15/2014 - 19:44:07: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:44:07: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:44:09: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [616 -883 -153] killed "Dave<9><BOT><CT>" [1002 -549 -88] with "awp"
L 07/15/2014 - 19:44:09: "Wayne<7><BOT><TERRORIST>" assisted killing "Dave<9><BOT><CT>"
L 07/15/2014 - 19:44:12: "Wayne<7><BOT><TERRORIST>" [132 158 -138] killed "Quinn<5><BOT><CT>" [629 23 -89] with "ak47"
L 07/15/2014 - 19:44:13: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:44:16: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:44:19: "Eric<6><BOT><CT>" [320 199 -152] killed "Wayne<7><BOT><TERRORIST>" [12 138 -44] with "m4a1" (headshot)
L 07/15/2014 - 19:44:21: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [524 -379 -156] killed "Eric<6><BOT><CT>" [206 162 -86] with "p250"
L 07/15/2014 - 19:44:22: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:44:24: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:44:26: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [572 200 -144] killed "Dave<9><BOT><CT>" [347 209 -88] with "p250" (headshot)
L 07/15/2014 - 19:44:26: "Vladimir<11><BOT><CT>" [82 64 -121] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [572 203 -80] with "awp"
L 07/15/2014 - 19:44:26: "Dave<9><BOT><CT>" assisted killing "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>"
L 07/15/2014 - 19:44:29: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:44:29: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:44:29: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:44:36: "gK.sn2<2><STEAM_1:1:84443486><CT>" [286 360 183] killed "Wayne<7><BOT><TERRORIST>" [497 335 243] with "awp"
L 07/15/2014 - 19:44:39: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:44:41: "Jeff<8><BOT><TERRORIST>" [213 -947 -152] killed "Vladimir<11><BOT><CT>" [206 -793 -88] with "sg556"
L 07/15/2014 - 19:44:45: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:44:45: "Zane<10><BOT><TERRORIST>" [418 1760 -199] killed "Dave<9><BOT><CT>" [745 1933 -87] with "p90"
L 07/15/2014 - 19:44:46: "Quinn<5><BOT><CT>" [938 1786 -129] killed "Zane<10><BOT><TERRORIST>" [418 1760 -135] with "awp"
L 07/15/2014 - 19:44:49: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:44:49: "Quinn<5><BOT><CT>" [1024 1773 -122] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [538 1735 -96] with "awp"
L 07/15/2014 - 19:44:49: "Eric<6><BOT><CT>" assisted killing "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>"
L 07/15/2014 - 19:44:49: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:44:52: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:44:52: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:44:57: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [465 1173 116] killed "Quinn<5><BOT><CT>" [816 1474 -84] with "awp" (headshot)
L 07/15/2014 - 19:45:00: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:45:00: "Derek<3><BOT><TERRORIST>" [957 1089 -300] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [923 1321 -242] with "ak47"
L 07/15/2014 - 19:45:02: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:45:02: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:45:07: "Quinn<5><BOT><CT>" [80 391 -16] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [148 170 188] with "awp"
L 07/15/2014 - 19:45:10: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:45:10: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:45:13: "Chet<4><BOT><TERRORIST>" [1855 782 -276] killed "Eric<6><BOT><CT>" [1922 649 -212] with "ak47"
L 07/15/2014 - 19:45:16: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:45:16: "Eric<6><BOT><CT>" purchased "deagle"
L 07/15/2014 - 19:45:21: "Zane<10><BOT><TERRORIST>" [2277 -1477 -154] killed "Dave<9><BOT><CT>" [1801 -1419 -73] with "p90"
L 07/15/2014 - 19:45:24: "Derek<3><BOT><TERRORIST>" [729 1801 -144] killed "Quinn<5><BOT><CT>" [1096 428 190] with "ak47" (headshot)
L 07/15/2014 - 19:45:24: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:45:26: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [856 1367 -148] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [1269 809 94] with "awp"
L 07/15/2014 - 19:45:27: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:45:27: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:45:27: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:45:27: "Quinn<5><BOT><CT>" purchased "p250"
L 07/15/2014 - 19:45:33: "gK.sn2<2><STEAM_1:1:84443486><CT>" [391 866 -152] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [264 909 -88] with "p250"
L 07/15/2014 - 19:45:36: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:45:36: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:45:36: "gK.sn2<2><STEAM_1:1:84443486><CT>" [257 1136 -152] killed "Derek<3><BOT><TERRORIST>" [411 1091 -88] with "awp"
L 07/15/2014 - 19:45:39: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:45:42: "gK.sn2<2><STEAM_1:1:84443486><CT>" [408 944 -152] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [389 1098 -88] with "awp"
L 07/15/2014 - 19:45:45: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:45:45: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:45:47: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1544 806 -143] killed "Vladimir<11><BOT><CT>" [1300 563 22] with "awp" (headshot)
L 07/15/2014 - 19:45:51: "Derek<3><BOT><TERRORIST>" [879 -758 -161] killed "Eric<6><BOT><CT>" [1041 -485 -92] with "ak47" (headshot)
L 07/15/2014 - 19:45:51: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:45:51: "Vladimir<11><BOT><CT>" purchased "p250"
L 07/15/2014 - 19:45:53: "gK.sn2<2><STEAM_1:1:84443486><CT>" [244 1670 -153] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [492 1331 48] with "awp"
L 07/15/2014 - 19:45:54: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:45:54: "Eric<6><BOT><CT>" purchased "p250"
L 07/15/2014 - 19:45:56: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:45:56: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:46:05: "Eric<6><BOT><CT>" [684 -562 -154] killed "Wayne<7><BOT><TERRORIST>" [1739 -1299 -79] with "m4a1"
L 07/15/2014 - 19:46:08: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:46:08: "Wayne<7><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:46:10: "Eric<6><BOT><CT>" [607 -896 -153] killed "Jeff<8><BOT><TERRORIST>" [1009 -460 -88] with "m4a1"
L 07/15/2014 - 19:46:13: "Jeff<8><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:46:21: "gK.sn2<2><STEAM_1:1:84443486><CT>" [322 959 -152] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [310 1127 -44] with "p250" (headshot)
L 07/15/2014 - 19:46:24: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:46:24: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:46:30: "Jeff<8><BOT><TERRORIST>" [1446 -1206 -147] killed "Eric<6><BOT><CT>" [447 -853 -88] with "ak47"
L 07/15/2014 - 19:46:32: "gK.sn2<2><STEAM_1:1:84443486><CT>" [216 870 -152] killed "Wayne<7><BOT><TERRORIST>" [81 723 -88] with "p250"
L 07/15/2014 - 19:46:33: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:46:35: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:46:37: "Vladimir<11><BOT><CT>" [1233 1821 -109] killed "Wayne<7><BOT><TERRORIST>" [1408 1349 -54] with "awp"
L 07/15/2014 - 19:46:40: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:46:42: "Dave<9><BOT><CT>" [1300 562 -24] killed "Zane<10><BOT><TERRORIST>" [1733 426 -92] with "m4a1"
L 07/15/2014 - 19:46:44: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [461 787 -152] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [403 800 -88] with "knife_t"
L 07/15/2014 - 19:46:46: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:46:46: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:46:46: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:46:52: "gK.sn2<2><STEAM_1:1:84443486><CT>" [461 1172 117] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [619 1450 -89] with "p250"
L 07/15/2014 - 19:46:53: "Derek<3><BOT><TERRORIST>" [360 -2311 -146] killed "Eric<6><BOT><CT>" [1501 -2371 -92] with "ak47"
L 07/15/2014 - 19:46:55: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:46:55: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:46:56: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:47:06: "Vladimir<11><BOT><CT>" [656 1468 -153] killed "Zane<10><BOT><TERRORIST>" [1527 735 -86] with "awp"
L 07/15/2014 - 19:47:09: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:47:12: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [402 1340 -16] killed "Vladimir<11><BOT><CT>" [411 1308 48] with "knife_t"
L 07/15/2014 - 19:47:12: "Jeff<8><BOT><TERRORIST>" [1071 -367 -277] killed "Quinn<5><BOT><CT>" [1073 -571 -87] with "ak47"
L 07/15/2014 - 19:47:15: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:47:15: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:47:16: "gK.sn2<2><STEAM_1:1:84443486><CT>" [1593 866 -135] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [963 1306 -75] with "awp"
L 07/15/2014 - 19:47:19: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:47:19: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:47:22: "Vladimir<11><BOT><CT>" [349 -1934 -146] killed "Jeff<8><BOT><TERRORIST>" [334 -1195 -84] with "awp" (headshot)
L 07/15/2014 - 19:47:23: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [860 -837 -161] killed "Eric<6><BOT><CT>" [882 -489 -89] with "awp"
L 07/15/2014 - 19:47:25: "Jeff<8><BOT><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:47:25: "Jeff<8><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:47:25: "Wayne<7><BOT><TERRORIST>" [1083 1414 -108] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [1614 1351 -70] with "ak47" (headshot)
L 07/15/2014 - 19:47:27: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:47:27: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:47:27: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:47:30: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [901 -31 -145] killed "Quinn<5><BOT><CT>" [583 465 242] with "awp"
L 07/15/2014 - 19:47:33: "gK.sn2<2><STEAM_1:1:84443486><CT>" [-74 -95 -133] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1360 286 -90] with "awp"
L 07/15/2014 - 19:47:33: "Quinn<5><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:47:36: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:47:36: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:47:36: "Derek<3><BOT><TERRORIST>" [1582 416 -153] killed "Dave<9><BOT><CT>" [1296 552 23] with "ak47"
L 07/15/2014 - 19:47:39: "Dave<9><BOT><CT>" purchased "ak47"
L 07/15/2014 - 19:47:43: "gK.sn2<2><STEAM_1:1:84443486><CT>" [636 -753 -156] killed "Jeff<8><BOT><TERRORIST>" [542 61 -90] with "awp" (headshot)
L 07/15/2014 - 19:47:46: "Jeff<8><BOT><TERRORIST>" purchased "sg556"
L 07/15/2014 - 19:47:47: "Vladimir<11><BOT><CT>" [1855 318 -277] killed "Chet<4><BOT><TERRORIST>" [1936 530 -80] with "hkp2000"
L 07/15/2014 - 19:47:49: "gK.sn2<2><STEAM_1:1:84443486><CT>" [588 -222 -147] killed "Derek<3><BOT><TERRORIST>" [982 67 -96] with "awp"
L 07/15/2014 - 19:47:51: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:47:52: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:48:00: "gK.sn2<2><STEAM_1:1:84443486><CT>" [363 536 -152] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [286 541 -88] with "awp"
L 07/15/2014 - 19:48:56: "Eric<6><BOT><CT>" assisted killing "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>"
L 07/15/2014 - 19:48:56: "Derek<3><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:48:58: "Jeff<8><BOT><TERRORIST>" purchased "galilar"
L 07/15/2014 - 19:48:58: "Jeff<8><BOT><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:48:59: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "awp"
L 07/15/2014 - 19:48:59: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" purchased "p250"
L 07/15/2014 - 19:49:02: "Chet<4><BOT><TERRORIST>" [856 -610 -157] killed "Vladimir<11><BOT><CT>" [912 -536 -93] with "ak47"
L 07/15/2014 - 19:49:03: "gK.sn2<2><STEAM_1:1:84443486><CT>" [-48 119 16] killed "Chet<4><BOT><TERRORIST>" [838 -610 -93] with "awp"
L 07/15/2014 - 19:49:05: "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [8 1247 -16] killed "Eric<6><BOT><CT>" [25 1214 107] with "knife_t"
L 07/15/2014 - 19:49:05: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:49:05: "Vladimir<11><BOT><CT>" purchased "deagle"
L 07/15/2014 - 19:49:06: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:49:09: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:49:10: "Vladimir<11><BOT><CT>" [772 470 -80] killed "Wayne<7><BOT><TERRORIST>" [1196 438 40] with "awp"
L 07/15/2014 - 19:49:13: "Wayne<7><BOT><TERRORIST>" purchased "m4a1"
L 07/15/2014 - 19:49:14: "gK.sn2<2><STEAM_1:1:84443486><CT>" [197 -524 -142] killed "Chet<4><BOT><TERRORIST>" [397 29 5] with "awp" (headshot)
L 07/15/2014 - 19:49:17: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:49:18: "gK.sn2<2><STEAM_1:1:84443486><CT>" [649 -483 -153] killed "Derek<3><BOT><TERRORIST>" [295 -137 -90] with "awp"
L 07/15/2014 - 19:49:19: Team "CT" triggered "SFUI_Notice_CTs_Win" (CT "0") (T "0")
L 07/15/2014 - 19:49:19: Team "CT" scored "0" with "5" players
L 07/15/2014 - 19:49:19: Team "TERRORIST" scored "0" with "6" players
L 07/15/2014 - 19:49:19: World triggered "Round_End"
L 07/15/2014 - 19:49:19: World triggered "Intermission_Time_Limit"
L 07/15/2014 - 19:49:19: "Derek<3><BOT><TERRORIST>" disconnected (reason "Kicked by Console")
L 07/15/2014 - 19:49:34: Log file closed

Re: Classement d'informations (fichier .log) dans un tableau

par Elie » 20 juil. 2014, 15:15

Le script est très bien fait ...
Reste a savoir comment tu attribues les points ?
Est-ce que si tu assistes quelqu'un tu gagnes aussi des points ?
Un headshot en vaut 2 ?
On est d'accord qu'on s'arrete au 5 actions... Entrée, tuer, headshot, purchased et assisted.
Est-ce que assisted a aussi une ligne killed pour celui qui a tuer ou alors faut donner des points au 2 ?

Il faut juste faire un bareme et que a l'intererieur de chaque preg_match tu donnes des points a qui de droit ...

Tu aurais un fichier log plus long histoire de faire une vrai calcule sur 100 lignes ? (Essaye de le mettre en piece jointe ou sur pastbin.com)

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 20 juil. 2014, 13:04

J'ai très bien compris ce que tu as mis a ma disposition, mais il faut déjà que je trouve le moyen de récupérer les données contenu dans le fichier. C'est ce que je suis en train d'essayer de faire. Ma situation actuelle :
_ Le fichier est traité ligne par ligne.
_ Chaque ligne est décomposée différemment (par la fonction preg_match) en tenant compte de certains mots clés, par exemple, si la ligne contient "killed" alors il s'agit d'une ligne qui indique que quelqu'un marque un point, si elle contient "entered the game" elle indique qu'un joueur s'est connecté. Pour que tu comprenne bien où j'en suis, voilà le code :
<?php
$log = file("test.log");
	foreach($log as $statInfo)
		{
			$patternHeadshot = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w+) "(\d*\w*)" (\(\w*\))#';
			$patternKills = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\-*\d* \-*\d* \-*\d*\]) (\w+) "(\d*\w*)"#';
			$patternAssists = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (\w*\s*\S*) "([\s\S]*)"#';
			$patternAchat = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (\w*) "(\w*\d*)"#';
			$patternConnexion = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?(?:<>)?" (.+)#';
			preg_match("#.*#",$statInfo,$stat);
			if(preg_match("#entered the game#",$statInfo,$stat))
			{
			preg_match($patternConnexion,$statInfo,$stat);
			print_r($stat);
			echo '<br />';
			}
			elseif(preg_match("#killed#",$statInfo,$stat))
			{
			preg_match($patternKills,$statInfo,$stat);
			print_r($stat);
			echo '<br />';
			}
			elseif(preg_match("#headshot#",$statInfo,$stat))
			{
			preg_match($patternHeadshot,$statInfo,$stat);
			print_r($stat);
			echo '<br />';
			}
			elseif(preg_match("#purchased#",$statInfo,$stat))
			{
			preg_match($patternAchat,$statInfo,$stat);
			print_r($stat);
			echo '<br />';
			}
			elseif(preg_match("#assisted killing#",$statInfo,$stat))
			{
			preg_match($patternAssists,$statInfo,$stat);
			print_r($stat);
			echo '<br />';
			}
		}
?>
Ce code permet de découper les lignes du fichier de sorte à pouvoir enregistrer plus facilement les données contenue dans le fichier, pour te faire comprendre la différence, voici une partie de fichier .log brut (original) :
L 07/15/2014 - 19:39:45: "Vladimir<11><BOT><CT>" purchased "awp"
L 07/15/2014 - 19:39:47: "Chet<4><BOT><TERRORIST>" purchased "ak47"
L 07/15/2014 - 19:39:48: "Chet<4><BOT><TERRORIST>" [650 1471 -153] killed "gK.sn2<2><STEAM_1:1:84443486><CT>" [602 1137 186] with "ak47" (headshot)
L 07/15/2014 - 19:39:49: "Dave<9><BOT><CT>" [116 851 -16] killed "Zane<10><BOT><TERRORIST>" [340 1069 49] with "m4a1"
L 07/15/2014 - 19:39:50: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:39:50: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:39:52: "Zane<10><BOT><TERRORIST>" purchased "p90"
L 07/15/2014 - 19:39:53: "Zane<10><BOT><TERRORIST>" purchased "deagle"
L 07/15/2014 - 19:40:00: "Vladimir<11><BOT><CT>" [1474 593 -159] killed "Chet<4><BOT><TERRORIST>" [1649 1194 -55] with "awp"

Et maintenant, les même lignes après avoir été traitées par le programme :
Array ( [0] => L 07/15/2014 - 19:39:45: "Vladimir<11>" purchased "awp" [1] => 07/15/2014 [2] => 19:39:45 [3] => Vladimir<11> [4] => purchased [5] => awp )
Array ( [0] => L 07/15/2014 - 19:39:47: "Chet<4>" purchased "ak47" [1] => 07/15/2014 [2] => 19:39:47 [3] => Chet<4> [4] => purchased [5] => ak47 )
Array ( [0] => L 07/15/2014 - 19:39:48: "Chet<4>" [650 1471 -153] killed "gK.sn2<2>" [602 1137 186] with "ak47" [1] => 07/15/2014 [2] => 19:39:48 [3] => Chet<4> [4] => killed [5] => gK.sn2<2> [6] => with [7] => ak47 )
Array ( [0] => L 07/15/2014 - 19:39:49: "Dave<9>" [116 851 -16] killed "Zane<10>" [340 1069 49] with "m4a1" [1] => 07/15/2014 [2] => 19:39:49 [3] => Dave<9> [4] => killed [5] => Zane<10> [6] => with [7] => m4a1 )
Array ( [0] => L 07/15/2014 - 19:39:50: "gK.sn2<2>" purchased "awp" [1] => 07/15/2014 [2] => 19:39:50 [3] => gK.sn2<2> [4] => purchased [5] => awp )
Array ( [0] => L 07/15/2014 - 19:39:50: "gK.sn2<2>" purchased "p250" [1] => 07/15/2014 [2] => 19:39:50 [3] => gK.sn2<2> [4] => purchased [5] => p250 )
Array ( [0] => L 07/15/2014 - 19:39:52: "Zane<10>" purchased "p90" [1] => 07/15/2014 [2] => 19:39:52 [3] => Zane<10> [4] => purchased [5] => p90 )
Array ( [0] => L 07/15/2014 - 19:39:53: "Zane<10>" purchased "deagle" [1] => 07/15/2014 [2] => 19:39:53 [3] => Zane<10> [4] => purchased [5] => deagle )
Array ( [0] => L 07/15/2014 - 19:40:00: "Vladimir<11>" [1474 593 -159] killed "Chet<4>" [1649 1194 -55] with "awp" [1] => 07/15/2014 [2] => 19:40:00 [3] => Vladimir<11> [4] => killed [5] => Chet<4> [6] => with [7] => awp )

Maintenant que j'ai accès à chaque type de lignes de façon individuelle, j'aimerais pouvoir faire en sorte que le programme enregistre chaque kills, morts, ... dès qu'il lit une ligne concernant l'action que je veux enregistrer dans un array (par joueurs), ou si ce n'est pas possible, dans une BDD (mais à ce moment là j'aimerais pouvoir faire en sorte qu'une table se créer automatiquement (d'après un model que j'aurais pré-enregistré) portant comme nom la date de partie, que j'extrairais du fichier .log, et mettre l'heure du début de partie (se trouvant également au début du fichier .log) en commentaire de la table).
Gros projet quand même... C'est pour cela qu'il serait préférable d'enregistrer tout cela dans un array (qui contiendrait un array par joueurs)...

Voilà, comprends-tu désormais où j'en suis ? :)
C'est aussi pour cela que je suis venu demander de l'aide, car c'est un projet assez complexe, pour moi du moins... ^^"

Re: Classement d'informations (fichier .log) dans un tableau

par Elie » 20 juil. 2014, 10:51

Qu'est-ce que toi tu as essayé de faire ?
Je t'ai donné la logique mais si tu n'essayes rien ...

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 20 juil. 2014, 09:05

Ouai... Il faudrait que j'obtienne un tableau comme celui-ci alors :
array( (par exemple)
Victor = (accumulation de tous ces points, par exemple) 78
Samuel = 60
Bernard = 43
....)
Et ensuite les classer dans le tableau du premier au dernier (Ranger en fonction de l'ordre décroissant des points).
Comment ?

Re: Classement d'informations (fichier .log) dans un tableau

par Elie » 20 juil. 2014, 00:07

Bah faut lier le joueur a ces points quoi ...

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 19 juil. 2014, 23:44

Salut !
C'est de cette manière que j'enregistre les noms :
<?php
$log = file("test.log");
foreach($log as $statInfo)
$patternConnexion = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S\d]>*)?" (.+)#';
if(preg_match("#entered the game#",$statInfo,$stat))
{
    preg_match($patternConnexion,$statInfo,$stat);
    $joueurs = array($stat[3]);
    print_r($joueurs);
    echo '<br />';
}
De cette manière ça fonctionne, je vois les noms de chaques joueurs. Le problème est que si je fais en print_r($joueurs) en dehors du foreach... Je ne vois que le nom du dernier joueur enregistré... Après tout c'est normal, les noms des joueurs s'écrasent les uns après les autres, c'est logique que je ne vois que le nom du dernier à s'être connecté au final. Quelle méthode me proposer vous afin que je puisse enregistrer les joueurs dans un array afin d'avoir quelque chose comme ça au final :
array(
[0] = Joueur1
[1] = Joueur2
[2] = Joueur3
....) ?

Re: Classement d'informations (fichier .log) dans un tableau

par Elie » 19 juil. 2014, 22:38

Voila comment je ferais ...
Vu que jai pas tout suivi, je ne sais pas comment tu recupere le nom du mec et ses points.
$point = array();
if(array_key_exists($la_variable_du_joueur_ou_peut_importe, $point) $point[$la_variable_du_joueur_ou_peut_importe] = 0;
$point[$la_variable_du_joueur_ou_peut_importe] += $le_nombre_de_point;

print_r($point);

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 19 juil. 2014, 22:21

Bonjour !
J'avais effectivement pensé à intégrer ces statistiques dans une base de donnée. Mais comment faire en sorte d'enregistrer les points d'un joueur dans une variable, et d'accumuler tous les points au fil de la lecture du fichier, et non pas de rajouter le même joueur à chaque point marquer, par exemple :
Au lieu d'avoir cela dans la BDD (exemple) :
Joueur Kills Deaths
A 1 1
A 1 1
A 1 1
....
Je voudrais faire en sorte d'accumuler les points comme ceci :
Joueur Kills Deaths
A 3 3
Comment pourrais-je faire ?
En prenant comme base ce code, donnez-moi juste un exemple en prenant en compte le nom d'un joueur, et les kills :
<?php
$log = file("test.log");
	foreach($log as $statInfo)
		{
			$patternHeadshot = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (?:\[\d* \d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\d* \d* \-*\d*\]) (\w+) "(\d*\w*)" (\(\w*\))#';
			$patternKills = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (?:\[\d* \d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\d* \d* \-*\d*\]) (\w+) "(\d*\w*)"#';
			$patternAssists = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (\w*\s*\S*) "([\s\S]*)"#';
			$patternAchat = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (\w*) "(\w*\d*)"#';
			$patternConnexion = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (.+)#';
			preg_match("#.*#",$statInfo,$stat);
			if(preg_match("#killed#",$statInfo,$stat))
			{
			preg_match($patternKills,$statInfo,$stat);
			print_r($stat);
			}
			if(preg_match("#headshot#",$statInfo,$stat))
			{
			preg_match($patternHeadshot,$statInfo,$stat);
			print_r($stat);
			}
			elseif(preg_match("#entered the game#",$statInfo,$stat))
			{
			preg_match($patternConnexion,$statInfo,$stat);
			print_r($stat);
			}
			elseif(preg_match("#purchased#",$statInfo,$stat))
			{
			preg_match($patternAchat,$statInfo,$stat);
			print_r($stat);
			}
			elseif(preg_match("#assisted killing#",$statInfo,$stat))
			{
			preg_match($patternAssists,$statInfo,$stat);
			print_r($stat);
			}
			echo '<br />';
		}
?>
Voici un bout du fichier .log original :
L 07/15/2014 - 19:44:03: "Eric<6><BOT><CT>" purchased "m4a1"
L 07/15/2014 - 19:44:04: "gK.sn2<2><STEAM_1:1:84443486><CT>" [1687 498 -157] killed "sn4GhostGost<12><STEAM_1:0:85317409><TERRORIST>" [1546 660 -40] with "awp"
L 07/15/2014 - 19:40:24: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "awp"
L 07/15/2014 - 19:40:24: "gK.sn2<2><STEAM_1:1:84443486><CT>" purchased "p250"
L 07/15/2014 - 19:40:29: "sn4GhostGost<12><STEAM_1:0:85317409><>" entered the game
L 07/15/2014 - 19:44:09: "Wayne<7><BOT><TERRORIST>" assisted killing "Dave<9><BOT><CT>"
Voici ce que ça donne à l'execution :
Array ( [0] => L 07/15/2014 - 19:44:03: "Eric<6>" purchased "m4a1" [1] => 07/15/2014 [2] => 19:44:03 [3] => Eric<6> [4] => purchased [5] => m4a1 )
Array ( [0] => L 07/15/2014 - 19:44:04: "gK.sn2<2>" [1687 498 -157] killed "sn4GhostGost<12>" [1546 660 -40] with "awp" [1] => 07/15/2014 [2] => 19:44:04 [3] => gK.sn2<2> [4] => killed [5] => sn4GhostGost<12> [6] => with [7] => awp )
Array ( [0] => L 07/15/2014 - 19:40:24: "gK.sn2<2>" purchased "awp" [1] => 07/15/2014 [2] => 19:40:24 [3] => gK.sn2<2> [4] => purchased [5] => awp )
Array ( [0] => L 07/15/2014 - 19:40:24: "gK.sn2<2>" purchased "p250" [1] => 07/15/2014 [2] => 19:40:24 [3] => gK.sn2<2> [4] => purchased [5] => p250 )
Array ( [0] => L 07/15/2014 - 19:40:29: "sn4GhostGost<12><>" entered the game [1] => 07/15/2014 [2] => 19:40:29 [3] => sn4GhostGost<12><> [4] => entered the game )
Array ( [0] => L 07/15/2014 - 19:44:09: "Wayne<7>" assisted killing "Dave<9>" [1] => 07/15/2014 [2] => 19:44:09 [3] => Wayne<7> [4] => assisted killing [5] => Dave<9> )

Une petite astuce ?

Re: Classement d'informations (fichier .log) dans un tableau

par Elie » 19 juil. 2014, 20:54

...

Soit tu les stockes dans une base de données.
Soit tu les stockes dans un autre fichier mais au propre avec file_put_contents : http://php.net/manual/fr/function.file-put-contents.php

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 19 juil. 2014, 19:59

Bonjour !
J'ai réussi à classer toutes les informations utiles dans un tableau ! Voici le résultat (ou plutôt une partie du résultat) :
Array ( [0] => L 07/15/2014 - 19:39:35: "Wayne<7>" purchased "m4a1" [1] => 07/15/2014 [2] => 19:39:35 [3] => Wayne<7> [4] => purchased [5] => m4a1 )
Array ( [0] => L 07/15/2014 - 19:39:41: "Chet<4>" [442 1350 -16] killed "Vladimir<11>" [413 1085 48] with "ak47" [1] => 07/15/2014 [2] => 19:39:41 [3] => Chet<4> [4] => killed [5] => Vladimir<11> [6] => with [7] => ak47 ) Array ( [0] => L 07/15/2014 - 19:39:41: "Chet<4>" [442 1350 -16] killed "Vladimir<11>" [413 1085 48] with "ak47" (headshot) [1] => 07/15/2014 [2] => 19:39:41 [3] => Chet<4> [4] => killed [5] => Vladimir<11> [6] => with [7] => ak47 [8] => (headshot) )
Voici le programme, ou du moins la partie PHP :
<?php
$log = file("test.log");
	foreach($log as $statInfo)
		{
			$patternHeadshot = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (?:\[\d* \d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\d* \d* \-*\d*\]) (\w+) "(\d*\w*)" (\(\w*\))#';
			$patternKills = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (?:\[\d* \d* \-*\d*\]) (\w*) "([\s\S]*)" (?:\[\d* \d* \-*\d*\]) (\w+) "(\d*\w*)"#';
			$patternAchat = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (\w*) "(\w*\d*)"#';
			$patternConnexion = '#L ([0-9/]{10}) - ([0-9:]{8}): "([\s\S]*?)(?:<STEAM[\s\S]>*)?" (.+)#';
			preg_match("#.*#",$statInfo,$stat);
			if(preg_match("#killed#",$statInfo,$stat))
			{
			preg_match($patternKills,$statInfo,$stat);
			print_r($stat);
			}
			if(preg_match("#headshot#",$statInfo,$stat))
			{
			preg_match($patternHeadshot,$statInfo,$stat);
			print_r($stat);
			}
			elseif(preg_match("#entered the game#",$statInfo,$stat))
			{
			preg_match($patternConnexion,$statInfo,$stat);
			print_r($stat);
			}
			elseif(preg_match("#purchased#",$statInfo,$stat))
			{
			preg_match($patternAchat,$statInfo,$stat);
			print_r($stat);
			}
			echo '<br />';
		}
?>
> Cependant il me reste une petite question, maintenant que j'ai accès au programme, de façon précise, comme inscrire ces informations dans un tableau, enfin je veux dire un vrai tableau d'affichage ?
Je voudrais en faire un tableau de score qui se créer donc de façon automatique à chaque fois que je lance mon serveur, j'afficherais les tableau, classés par date, sur mon serveur :)

Re: Classement d'informations (fichier .log) dans un tableau

par sn2GhostKiller » 19 juil. 2014, 15:57

Bonjour,
Effectivement, que de bêtise... Et je penserais à utiliser les balises dans mes prochains messages.

Re: Classement d'informations (fichier .log) dans un tableau

par Wolan » 19 juil. 2014, 14:12

Bonjour,

Il n'y a pas une accolade en trop il manque une parenthèse à la fin de ta condition, avant l'accolade.
<?php
$log = file("test.log");
foreach ($log as $lineNumber => $lineContent)
{
if(preg_match("#killed#",$lineContent)){
Pense à utiliser la balise php dans tes messages pour que le code soit plus facile à lire.

Je ferais plutôt un seul pattern pour toutes les lignes que de faire plusieurs patterns.

Bonne journée.