AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Weapon Icon Display ( zenix ) (https://forums.alliedmods.net/showthread.php?t=69664)

hoboman 04-08-2008 20:11

Weapon Icon Display ( zenix )
 
7 Attachment(s)
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

bmann_420 04-08-2008 21:25

Re: Weapon Icon Display ( zenix )
 
Nice

spiderbites 04-08-2008 22:29

Re: Weapon Icon Display ( zenix )
 
@hoboman - can you add option to not change icon colors and displays green icons only (skip ammo checks)

hoboman 04-08-2008 23:25

Re: Weapon Icon Display ( zenix )
 
Quote:

Originally Posted by spiderbites (Post 608617)
@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


ali_zkz 04-10-2008 07:38

Re: Weapon Icon Display ( zenix )
 
i love the last ..but this GJ is my best love

hoboman 04-11-2008 19:01

Re: Weapon Icon Display ( zenix )
 
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

xjavo 04-11-2008 23:38

Re: Weapon Icon Display ( zenix )
 
precache it?

hoboman 04-12-2008 01:36

Re: Weapon Icon Display ( zenix )
 
Quote:

Originally Posted by Azn_Playa (Post 610081)
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

P4rD0nM3 04-12-2008 16:03

Re: Weapon Icon Display ( zenix )
 
What flash icon? The one divided in half?

hoboman 04-12-2008 19:08

Re: Weapon Icon Display ( zenix )
 
yes...unfortunately valve messed up that icon and didn't make an icon for the smoke grenade at all


All times are GMT -4. The time now is 15:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.