ItsMods

Full Version: Stance Monitor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello

This is something that appears in MW2 Campaign and is not in MP, look at right screen in the video and check the man icon:



In init():

Code:
    precacheShader("stance_prone");
    precacheShader("stance_stand");
    precacheShader("stance_crouch");

Anywhere:

Code:
MonitorStance()
{
    self.stance = newHudElem();
    self.stance.x = 620;
    self.stance.y = 320;    
    self.stance setshader("stance_stand",100,100);
    self thread DestroyIcon(self.stance);
    while(1)
    {
        if(self getStance() == "stand")
        {
            self.stance setshader("stance_stand",100,100);
        }
        if(self getStance() == "prone")
        {
            self.stance setshader("stance_prone",100,100);
        }
        if(self getStance() == "crouch")
        {
            self.stance setshader("stance_crouch",100,100);
        }
    wait 0.1;
    }
}

DestroyIcon(elem)
{
    self waittill("death");
    elem destroy();
}
lol good idea, never thought of this Tongue
I have seen someone put this in black ops, can't remember the mod though.
This SCRIPT doesn't work in black ops. In black ops you have to edit hud.menu

@Yamato nice release.
(08-22-2011, 16:26)Pozzuh Wrote: [ -> ]This SCRIPT doesn't work in black ops. In black ops you have to edit hud.menu

@Yamato nice release.

Nope its just a dvar @ blops

You can also just do

Code:
self.stance setShader( "stance_" + self getStance(), 100, 100 );
Epic Nyan Cat
@Pozzuh

this is in the hud.menu from blops

C Code
  1. // Stance indicator
  2. menuDef
  3. {
  4. name "stance"
  5. rect 145 -81 48 48 HORIZONTAL_ALIGN_USER_LEFT VERTICAL_ALIGN_USER_BOTTOM
  6. fullScreen 0
  7. visible 1
  8. visibilityBits bits( !BIT_IS_FLASH_BANGED !BIT_IN_GUIDED_MISSILE !BIT_IN_GUIDED_MISSILE_STATIC !BIT_UI_ACTIVE !BIT_SPECTATING_CLIENT )
  9. itemDef
  10. {
  11. name "chRect"
  12. type ITEM_TYPE_OWNERDRAW_TEXT
  13. rect 0 0 80 80 // 64x64
  14. ownerdraw CG_PLAYER_STANCE
  15. textfont UI_FONT_NORMAL
  16. visible when( dvarint( ui_hud_showstanceicon ) != 0 );
  17. visibilityBits bits( HUD_VISIBILITY !BIT_IN_KILLCAM !BIT_SELECTING_LOCATION )
  18. forecolor 1 1 1 HUD_ALPHA
  19. decoration
  20. }
  21. }


just do
Code:
self setClientDvar( "ui_hud_showstanceicon", 1 );
and you got it Wink
@iAegle u so smart!
(08-22-2011, 21:02)Pozzuh Wrote: [ -> ]@iAegle u so smart!

I just have eye's ;D
i lol'd
Pages: 1 2