All pastes #608425 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-07-08 08:54 UTC
rendered paste body
if %WEAPON_ITEM 


  if %WEAPON_ITEM <= 5
    if %AMMO > 0
      setCursor #WIDTH / 2, #HEIGHT / 2 - 0.31
      setAlign #CENTER, #MIDDLE
      setSize 10, 10
      setColor 1, 0, 0, 1
      drawNum %AMMO
    endif
    if %AMMO == 0
      if %WEAK_AMMO > 0
        setCursor #WIDTH / 2, #HEIGHT / 2 - 0.31
        setAlign #CENTER, #MIDDLE
        setSize 10, 10
        setColor 1, 1, 0, 1 
        if %WEAK_AMMO > 4
          setColor 0, 1, 0, 1 
        endif
        drawNum %WEAK_AMMO
      endif
    endif
    if %WEAK_AMMO == 0
      if %AMMO == 0
      endif
    endif
  endif

  if %WEAPON_ITEM == 8
    if %AMMO > 0
      setCursor #WIDTH / 2, #HEIGHT / 2 - 0.31
      setAlign #CENTER, #MIDDLE
      setSize 10, 10
      setColor 1, 0, 0, 1
      drawNum %AMMO
    endif
    if %AMMO == 0
      if %WEAK_AMMO > 0
        setCursor #WIDTH / 2, #HEIGHT / 2 - 0.31
        setAlign #CENTER, #MIDDLE
        setSize 10, 10
        setColor 1, 1, 0, 1 
        if %WEAK_AMMO > 4
          setColor 0, 1, 0, 1 
        endif
        drawNum %WEAK_AMMO
      endif
    endif
    if %WEAK_AMMO == 0
      if %AMMO == 0
      endif
    endif
  endif 

  
endif



What I need help with is getting weapon 6 and 7 added to this mess. I need 6 and 7 separated from the rest because they change from green to yellow color on a value of 24 or greater, all other weapons changes from green to yellow color on value 4 or greater.

If I try to merge <= 5 and == 8 with | between the %'s, only the first 5 weapons get affected. 8 is left out.

If i try to add more if %WEAPON_ITEM == (ie. 6 and 7), they doesn't get loaded. If i cut 6 and 7 and paste them above <= 5 and == 8, 6 and 7 loads, while <= 5 and =8 is left out.

Any thoughts on this subject?

This code is for the Warsow 0.31 hud, btw.