Raised This Month: $66 Target: $400
 16% 

Weapon Icon Display ( zenix )


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose        Approver:   Hawk552 (427)
hoboman
Senior Member
Join Date: Jul 2007
Old 04-08-2008 , 21:11   Weapon Icon Display ( zenix )
Reply With Quote #1

Introduction:
The original author of this plugin ( unapproved now ) stopped supporting this almost a year ago and his plugin contained some annoying bugs such as the icons constantly being pink.

Description:
This plugin displays your current weapon as an icon in your hud.
Icon colors:
green - sufficient ammo
yellow - last clip of ammo
red - no more ammo left
Cvars:
amx_weapon_location x (0/1/2 - default is 1 ) - If 0 then no icon will be displayed. If 1 then the icon will be displayed on the left side of the screen with the other icons. If 2 then the icon will be displayed by the game clock.
Notes:
- the flash bang and the smoke nade share the same icon because the game developers decided not to make an icon for the smoke for some unknown reason
- I was not able to fix the flashbang/smoke icon because the sprites are read from the hud.txt on client side
Attached Thumbnails
Click image for larger version

Name:	1.JPG
Views:	531519
Size:	1.7 KB
ID:	25440   Click image for larger version

Name:	2.JPG
Views:	353201
Size:	2.0 KB
ID:	25441   Click image for larger version

Name:	3.JPG
Views:	344661
Size:	2.0 KB
ID:	25442  
Attached Files
File Type: sma Get Plugin or Get Source (weapon_icon.sma - 82582 views - 4.9 KB)
__________________

Last edited by hoboman; 04-23-2008 at 17:53. Reason: update
hoboman is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 04-08-2008 , 22:25   Re: Weapon Icon Display ( zenix )
Reply With Quote #2

Nice
__________________
bmann_420 is offline
spiderbites
Senior Member
Join Date: Nov 2007
Old 04-08-2008 , 23:29   Re: Weapon Icon Display ( zenix )
Reply With Quote #3

@hoboman - can you add option to not change icon colors and displays green icons only (skip ammo checks)
spiderbites is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 04-09-2008 , 00:25   Re: Weapon Icon Display ( zenix )
Reply With Quote #4

Quote:
Originally Posted by spiderbites View Post
@hoboman - can you add option to not change icon colors and displays green icons only (skip ammo checks)
no

delete these lines and recompile:
Code:
    // ammo check, this is for the color of the icon
    if ((ammo == 0 && clip == 0)) //changed from: if (ammo == 0 && clip == 0)
        icon_color = {255, 0, 0} // outta ammo!
    else if ( ammo==0 && iwpn!=CSW_KNIFE)  //changed from: if (ammo == clip || ammo > clip)
        icon_color = {255, 180, 0} // last clip!
    else 
        icon_color = {0, 180, 0}//green icon...decent ammo
__________________
hoboman is offline
ali_zkz
Member
Join Date: Jan 2006
Old 04-10-2008 , 08:38   Re: Weapon Icon Display ( zenix )
Reply With Quote #5

i love the last ..but this GJ is my best love
ali_zkz is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 04-11-2008 , 20:01   Re: Weapon Icon Display ( zenix )
Reply With Quote #6

meh....I have realized that I failed
the sprites are taken client side from the hud.txt, so unless I can find a way to send the new hud.txt to every single player the flash icon will not be fixed
__________________
hoboman is offline
xjavo
Member
Join Date: Sep 2005
Old 04-12-2008 , 00:38   Re: Weapon Icon Display ( zenix )
Reply With Quote #7

precache it?
xjavo is offline
Send a message via AIM to xjavo Send a message via MSN to xjavo Send a message via Yahoo to xjavo
hoboman
Senior Member
Join Date: Jul 2007
Old 04-12-2008 , 02:36   Re: Weapon Icon Display ( zenix )
Reply With Quote #8

Quote:
Originally Posted by Azn_Playa View Post
precache it?
the hud.txt is already on every player's comp. except it is in the .gcf archive...I don't think it can be precached
__________________
hoboman is offline
P4rD0nM3
Veteran Member
Join Date: Feb 2006
Old 04-12-2008 , 17:03   Re: Weapon Icon Display ( zenix )
Reply With Quote #9

What flash icon? The one divided in half?
P4rD0nM3 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 04-12-2008 , 20:08   Re: Weapon Icon Display ( zenix )
Reply With Quote #10

yes...unfortunately valve messed up that icon and didn't make an icon for the smoke grenade at all
__________________
hoboman is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:14.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode