Raised This Month: $51 Target: $400
 12% 

Ammo HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 01-13-2012 , 06:12   Ammo HUD
Reply With Quote #1



Its possible this in cs?
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 01-13-2012 , 07:11   Re: Ammo HUD
Reply With Quote #2

Nope.
Using ohter icon then yes.
.Dare Devil. is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 01-13-2012 , 08:02   Re: Ammo HUD
Reply With Quote #3

Its possible.

1) See 3rd and 4rth parameter of WeaponList message.Its secondary ammo.Make it something like that:
Code:
write_byte( 15 ); // ammo id
write_byte( 10 ); // max ammo
Why 15? Because last ammo index in CS is 14. Last avaiable is 32.

2) Dont forget to configure the .txt file.
3) Now you have to hook Ham_Item_AddToPlayer and than type in there something like this:

Code:
const m_rg_PlayerAmmo_Slot0 = 376;
const iCount = 2;
set_pdata_int(id, m_rg_PlayerAmmo_Slot0 + 15, iCount, 5 )
Note that the number that follows m_rg_PlayerAmmo_Slot0 must be the same as in WeaponList message.It represents the ammo index.

And dont forget to hide the money HUD, since it will mess up with your HUD ammo.

Anyway, its just an example, you should create a variable, like g_iGrenadeCount[ 33 ], and update ammo count with set_pdata_int each time g_iGrenadeCount value changes.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
bogdyuttzu
Senior Member
Join Date: Dec 2009
Location: Romania
Old 01-13-2012 , 09:01   Re: Ammo HUD
Reply With Quote #4

OOh thanks

Last edited by bogdyuttzu; 01-13-2012 at 10:20.
bogdyuttzu is offline
Send a message via Yahoo to bogdyuttzu
Reply



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 05:13.


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