query("SELECT `code`,`name` FROM hlstats_Weapons WHERE game='$game'"); while ($rowdata = $db->fetch_row($result)) { $code = $rowdata[0]; $fname[$code] = htmlspecialchars($rowdata[1]); } $tblWeapons = new Table( array( new TableColumn( 'weapon', 'Weapon', 'width=15&type=weaponimg&align=center&link=' . urlencode("mode=weaponinfo&weapon=%k&game=$game"), $fname ), new TableColumn( 'modifier', 'Points Modifier', 'width=10&align=right' ), new TableColumn( 'kills', 'Kills', 'width=11&align=right' ), new TableColumn( 'kpercent', 'Percentage of Kills', 'width=18&sort=no&type=bargraph' ), new TableColumn( 'kpercent', '%', 'width=5&sort=no&align=right&append=' . urlencode('%') ), new TableColumn( 'headshots', 'Headshots', 'width=8&align=right' ), new TableColumn( 'hpercent', 'Percentage of Headshots', 'width=18&sort=no&type=bargraph' ), new TableColumn( 'hpercent', '%', 'width=5&sort=no&align=right&append=' . urlencode('%') ), new TableColumn( 'hpk', 'Hpk', 'width=5&align=right' ) ), 'weapon', 'kills', 'weapon', true, 9999, 'weap_page', 'weap_sort', 'weap_sortorder', 'tabweapons', 'desc', true ); $result = $db->query(" SELECT hlstats_Events_Frags.weapon, IFNULL(hlstats_Weapons.modifier, 1.00) AS modifier, COUNT(hlstats_Events_Frags.weapon) AS kills, ROUND(COUNT(hlstats_Events_Frags.weapon) / $realkills * 100, 2) AS kpercent, SUM(hlstats_Events_Frags.headshot=1) as headshots, ROUND(SUM(hlstats_Events_Frags.headshot=1) / IF(COUNT(hlstats_Events_Frags.weapon) = 0, 1, COUNT(hlstats_Events_Frags.weapon)), 2) AS hpk, ROUND(SUM(hlstats_Events_Frags.headshot=1) / $realheadshots * 100, 2) AS hpercent FROM hlstats_Events_Frags LEFT JOIN hlstats_Weapons ON hlstats_Weapons.code = hlstats_Events_Frags.weapon LEFT JOIN hlstats_Players ON hlstats_Players.playerId=hlstats_Events_Frags.killerId WHERE clan=$clan AND hlstats_Weapons.game='$game' GROUP BY hlstats_Events_Frags.weapon ORDER BY $tblWeapons->sort $tblWeapons->sortorder, $tblWeapons->sort2 $tblWeapons->sortorder "); printSectionTitle('Weapon Usage *'); $tblWeapons->draw($result, $db->num_rows($result), 95); ?>

query(" SELECT hlstats_Events_Statsme.weapon AS smweapon, SUM(hlstats_Events_Statsme.kills) AS smkills, SUM(hlstats_Events_Statsme.hits) AS smhits, SUM(hlstats_Events_Statsme.shots) AS smshots, SUM(hlstats_Events_Statsme.headshots) AS smheadshots, SUM(hlstats_Events_Statsme.deaths) AS smdeaths, SUM(hlstats_Events_Statsme.damage) AS smdamage, ROUND((SUM(hlstats_Events_Statsme.damage) / (IF( SUM(hlstats_Events_Statsme.hits)=0, 1, SUM(hlstats_Events_Statsme.hits) ))), 1) as smdhr, SUM(hlstats_Events_Statsme.kills) / IF((SUM(hlstats_Events_Statsme.deaths)=0), 1, (SUM(hlstats_Events_Statsme.deaths))) as smkdr, ROUND((SUM(hlstats_Events_Statsme.hits) / SUM(hlstats_Events_Statsme.shots) * 100), 1) as smaccuracy, ROUND(( (IF(SUM(hlstats_Events_Statsme.kills)=0, 0, SUM(hlstats_Events_Statsme.shots))) / (IF( SUM(hlstats_Events_Statsme.kills)=0, 1, SUM(hlstats_Events_Statsme.kills) ))), 1) as smspk FROM hlstats_Events_Statsme LEFT JOIN hlstats_Players ON hlstats_Players.playerId=hlstats_Events_Statsme.playerId WHERE clan=$clan GROUP BY hlstats_Events_Statsme.weapon HAVING SUM(hlstats_Events_Statsme.shots)>0 ORDER BY $tblWeaponstats->sort $tblWeaponstats->sortorder, $tblWeaponstats->sort2 $tblWeaponstats->sortorder "); if ($db->num_rows($result) != 0) { printSectionTitle('Weapon Stats *'); $tblWeaponstats->draw($result, $db->num_rows($result), 95); ?>

0 ORDER BY $tblWeaponstats2->sort $tblWeaponstats2->sortorder, $tblWeaponstats2->sort2 $tblWeaponstats2->sortorder "; $result = $db->query($query); if ($db->num_rows($result) != 0) { printSectionTitle('Weapon Targets *'); if ($g_options['show_weapon_target_flash'] == 1) { ?>
draw($result, $db->num_rows($result), 100); $flashlink = IMAGE_PATH.'/hitbox.swf?wname=All+Weapons&head='.$weapon_data['total']['head'].'&rightarm='.$weapon_data['total']['leftarm'].'&leftarm='.$weapon_data['total']['rightarm'].'&chest='.$weapon_data['total']['chest'].'&stomach='.$weapon_data['total']['stomach'].'&rightleg='.$weapon_data['total']['leftleg'].'&leftleg='.$weapon_data['total']['rightleg'].'&model='.$start_model.'&numcolor_num=#'.$g_options['graphtxt_load'].'&numcolor_pct=#'.$g_options['graphtxt_load'].'&linecolor=#'.$g_options['graphtxt_load'].'&barcolor=#FFFFFF&barbackground=#000000&textcolor=#FFFFFF&captioncolor=#FFFFFF&textcolor_total=#FFFFFF'; ?>
Targets
The hitbox display requires Adobe Flash Player to view.
Show total target statistics
draw($result, $db->num_rows($result), 95); } ?>