mag indicator
Posted: Sun Jan 21, 2007 7:29 pm
how do u make an indicator for the amount of bullets in the mag
Clip & Magazine Display
In conjunction with weapon reloading it is possible to make the HUD display the amounts left in the clip and the number of clips left, rather than just the amount of ammunition. This change only applies if the currently selected weapon supports clips. If it doesn't, then just the amount of ammunition will be shown.
To make the HUD entry show the amount left in the clip add the line:
style = magazine
to the HUD definition. To make it show the number of clips left add this line:
style = clip
To show both clips and magazine contents at the same time you must use the ~ extension to the HUD entry name and define two different entries. For example, to show magazines and clips for bullets you would make the definitions like this:
[bullet]
type = numeric
style = magazine
framex = -100
framey = 0
indicatoroffsetx = 36
indicatoroffsety = 138
font = 9
width = 3
active = false
[~bullet]
type = numeric
style = clip
framex = -100
framey = 0
indicatoroffsetx = 36
indicatoroffsety = 158
font = 9
width = 3
active = false
Please note : if the weapon does not support magazines then the section that displays the magazines will not be displayed. Only the section that shows the clips will be used to display the amount of ammunition.