replaced get_weaponname with xmod_get_wpnname

This commit is contained in:
Lukasz Wlasinksi 2004-10-25 11:16:02 +00:00
parent 3d1162ecd9
commit 0e681d9bd4
3 changed files with 6 additions and 6 deletions

View File

@ -33,6 +33,7 @@
*/ */
#include <amxmodx> #include <amxmodx>
#include <csx>
public MultiKill public MultiKill
public MultiKillSound public MultiKillSound
@ -328,7 +329,7 @@ public client_death(killer,victim,wpnindex,hitplace,TK) {
if ( headshot && (HeadShotKill || HeadShotKillSound) ) { if ( headshot && (HeadShotKill || HeadShotKillSound) ) {
if ( HeadShotKill ) { if ( HeadShotKill ) {
new killer_name[32], victim_name[32], weapon_name[32], message[128], players[32], pnum new killer_name[32], victim_name[32], weapon_name[32], message[128], players[32], pnum
get_weaponname(wpnindex,weapon_name,31) xmod_get_wpnname(wpnindex,weapon_name,31)
get_user_name(killer,killer_name,31) get_user_name(killer,killer_name,31)
get_user_name(victim,victim_name,31) get_user_name(victim,victim_name,31)
@ -385,7 +386,7 @@ public showStatus(id) {
if (g_friend[id]==1) { // friend if (g_friend[id]==1) { // friend
new clip, ammo, wpnid = get_user_weapon(pid,clip,ammo) new clip, ammo, wpnid = get_user_weapon(pid,clip,ammo)
new wpnname[32] new wpnname[32]
get_weaponname(wpnid,wpnname,31) xmod_get_wpnname(wpnid,wpnname,31)
set_hudmessage(color1,50,color2,-1.0,0.60,1, 0.01, 3.0, 0.01, 0.01, 4) set_hudmessage(color1,50,color2,-1.0,0.60,1, 0.01, 3.0, 0.01, 0.01, 4)
show_hudmessage(id,"%s -- %d HP / %d AP / %s",name, show_hudmessage(id,"%s -- %d HP / %d AP / %s",name,
get_user_health(pid),get_user_armor(pid),wpnname) get_user_health(pid),get_user_armor(pid),wpnname)

View File

@ -54,8 +54,7 @@ public client_disconnect(id) {
get_user_authid(id, szAuthid , 31 ) get_user_authid(id, szAuthid , 31 )
for (new i = 1 ; i < 31 ; ++i ) { for (new i = 1 ; i < 31 ; ++i ) {
if ( get_user_wstats( id , i ,iStats , iHits ) ) { if ( get_user_wstats( id , i ,iStats , iHits ) ) {
get_weaponname( i , szWeapon , 23 ) xmod_get_wpnname( i , szWeapon , 23 )
log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^")", log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^")",
szName,iUserid,szAuthid,szTeam,szWeapon,iStats[4],iStats[5],iStats[0], iStats[2],iStats[3],iStats[6],iStats[1]) szName,iUserid,szAuthid,szTeam,szWeapon,iStats[4],iStats[5],iStats[0], iStats[2],iStats[3],iStats[6],iStats[1])
log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"%s^") (head ^"%d^") (chest ^"%d^") (stomach ^"%d^") (leftarm ^"%d^") (rightarm ^"%d^") (leftleg ^"%d^") (rightleg ^"%d^")", log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"%s^") (head ^"%d^") (chest ^"%d^") (stomach ^"%d^") (leftarm ^"%d^") (rightarm ^"%d^") (leftleg ^"%d^") (rightleg ^"%d^")",

View File

@ -800,7 +800,7 @@ format_stats( id, sBuffer[MAX_BUFFER_LENGTH+1] ) {
lWeapon, lKills, lDeaths, lHits, lShots, lDamage, lAcc ) lWeapon, lKills, lDeaths, lHits, lShots, lDamage, lAcc )
for ( iWeapon = 1; iWeapon < xmod_get_maxweapons() && MAX_BUFFER_LENGTH - iLen > 0 ; iWeapon++ ) { for ( iWeapon = 1; iWeapon < xmod_get_maxweapons() && MAX_BUFFER_LENGTH - iLen > 0 ; iWeapon++ ) {
if ( get_user_wstats( id, iWeapon, izStats, izBody ) ) { if ( get_user_wstats( id, iWeapon, izStats, izBody ) ) {
get_weaponname( iWeapon, t_sWpn, MAX_WEAPON_LENGTH ) xmod_get_wpnname( iWeapon, t_sWpn, MAX_WEAPON_LENGTH )
iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen, iLen += format( sBuffer[iLen], MAX_BUFFER_LENGTH - iLen,
"%-12.12s %6d %6d %6d %6d %6d %3.0f%%^n", "%-12.12s %6d %6d %6d %6d %6d %3.0f%%^n",
t_sWpn, izStats[STATS_KILLS], izStats[STATS_DEATHS], t_sWpn, izStats[STATS_KILLS], izStats[STATS_DEATHS],
@ -999,7 +999,7 @@ public cmdReport( id ) {
} }
new iWeapon, iClip, iAmmo, iHealth, iArmor new iWeapon, iClip, iAmmo, iHealth, iArmor
iWeapon = get_user_weapon( id, iClip, iAmmo ) iWeapon = get_user_weapon( id, iClip, iAmmo )
get_weaponname( iWeapon, t_sWpn, MAX_WEAPON_LENGTH ) xmod_get_wpnname( iWeapon, t_sWpn, MAX_WEAPON_LENGTH )
iHealth = get_user_health( id ) iHealth = get_user_health( id )
iArmor = get_user_armor( id ) iArmor = get_user_armor( id )
new lWeapon[16] new lWeapon[16]