int HLStatsIngame::GetWeaponIndex(const char *WeaponName) { for(int i=1;i= g_WeaponListCount) // This is a new weapon we add it { _snprintf(g_sWeaponList[i],MAX_WEAPONNAMELEN,"%s",WeaponName); g_WeaponListCount++; return i; } if(strcmp(WeaponName,g_sWeaponList[i]) == 0) return i; } return -1; } char* HLStatsIngame::GetWeaponName(int WeaponIndex) { if(WeaponIndex >= g_WeaponListCount) return "Error"; return g_sWeaponList[WeaponIndex]; }