~Weapon Icon Display~

I don’t know of any use of this in a game or something, but I saw it in GunGame and thought it was cool, so I opened it up, found that it was mostly just related code and really couldn’t just take the 1 function that does it and put it into another file. 

 So, I just pretty much made this from scratch.

#include <amxmodx>

amx_show_weapon_icon – Show the icon?
amx_weapon_icon – Command toggle wrapper for amx_show_weapon_icon

Known Bugs/Glitches

  • Gernade sprites are scewing up – flashbang is showing part of HE, Smoke is HE gernade, sigh…


  • SAMURAI16 – For his awsome User Icon Status tutorial
  • XxAvalanchexX – For writing GunGame which gave me this idea
  • pizzahut – use CurWeapon event instead of PlayerPreThink
  • Deviance – use get_players()


  • Move the icon next to the time remaining (like in GunGame) – Maybe, maybe not. You can not change the color of the icon when it’s next to the time display [ATTEMPTING]
  • Add support for other mods/special weapons (like a rocket launcher or jetpack) [UNKNOWN]

I put this mod as Counter Strike only as I don’t know if the weapon icons/id’s are the same between most of the mods. CZ, maybe, but I have not tested it yet.
1st plugin!
Due to how the plugin ensures that each user has his/her own icon and keeps status of each one seperatly, players may experience a momentary delay of 1-3 secs before the icon changes to reflect their current weapon. The more players, the more likely and longer this effect. This may also happen with a rapid change of guns (ie picking up/dropping until finding desired one on an fy_ map)

By fatoni

Leave a Reply

Your email address will not be published. Required fields are marked *