Thread: Health Bar

Results 1 to 10 of 10
  1. #1
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored

    Health Bar

    does any1 hav the code for the health bar like on the ai zombies and u cant find anywhere

    thankz

  2. #2
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh
    Just rip it from AIZombies XD, Let me rip it. Minute please.

    Note; This is 100% ripped and untested; If it is incorrect, I am sorry.

    one code related to it I believe.
    [php]healthRegenerated()
    {
    if ( !isalive( self ) )
    return;

    if ( !mayProcessChallenges() )
    return;

    if ( !self rankingEnabled() )
    return;

    self thread resetBrinkOfDeathKillStreakShortly();

    if ( isdefined( self.lastDamageWasFromEnemy ) && self.lastDamageWasFromEnemy )
    self.healthRegenerationStreak++;
    }[/php]



    [php]hud_health()
    {
    self notify("stop_healthbar_thread");
    self endon("disconnect");
    self endon("stop_healthbar_thread");

    widthofbar = 128;
    x = 10;
    y = 412;

    if(isDefined(self.healthword))
    self.healthword destroy();

    if(isDefined(self.healthnum))
    self.healthnum destroy();

    if(isDefined(self.healthbar))
    self.healthbar destroy();

    if(isDefined(self.healthbarback))
    self.healthbarback destroy();

    if(isDefined(self.healthwarning))
    self.healthwarning destroy();

    if(isDefined(self.intermissionTimer))
    self.intermissionTimer destroy();

    if(isDefined(self.intermissionTimer2))
    self.intermissionTimer2 destroy();

    if(isDefined(self.nvText))
    self.nvText destroy();

    if(isDefined(self.nvText2))
    self.nvText2 destroy();

    self.intermissionTimer = self createFontString( "objective", 1.3 );
    self.intermissionTimer setPoint( "TOP", "TOP", 0, 150 );
    self.intermissionTimer.color = (1, 0, 0);

    self.intermissionTimer2 = self createFontString( "hudbig", 0.9 );
    self.intermissionTimer2 setPoint( "TOP", "TOP", 0, 165 );
    self.intermissionTimer2.color = (1, 1, 0);

    self.nvText = self createFontString( "objective", 0.7 );
    self.nvText setPoint( "TOP", "TOP", -10, 450 );
    self.nvText setText(game["strings"]["MP_NV"]["1"]);

    self.nvText2 = self createFontString( "objective", 0.7 );
    self.nvText2 setPoint( "TOP", "TOP", -10, 460 );
    self.nvText2 setText(game["strings"]["MP_NV"]["2"]);

    self.healthword = newclienthudelem(self);
    self.healthword.alignX = "left";
    self.healthword.alignY = "middle";
    self.healthword.horzAlign = "fullscreen";
    self.healthword.vertAlign = "fullscreen";
    self.healthword.x = x;
    self.healthword.y = y - 12;
    self.healthword.alpha = 1;
    self.healthword.sort = 2;
    self.healthword.fontscale = 1.4;
    self.healthword.color = (0,1,0);
    self.healthword setText(game["strings"]["MP_HEALTH"]);

    self.healthnum = newclienthudelem(self);
    self.healthnum.alignX = "left";
    self.healthnum.alignY = "middle";
    self.healthnum.horzAlign = "fullscreen";
    self.healthnum.vertAlign = "fullscreen";
    self.healthnum.x = x + 40;
    self.healthnum.y = y - 12;
    self.healthnum.alpha = 1;
    self.healthnum.sort = 2;
    self.healthnum.fontscale = 1.4;
    self.healthnum.color = (0,1,0);

    self.healthbar = newclienthudelem(self);
    self.healthbar.alignX = "left";
    self.healthbar.alignY = "middle";
    self.healthbar.horzAlign = "fullscreen";
    self.healthbar.vertAlign = "fullscreen";
    self.healthbar.x = x;
    self.healthbar.y = y;
    self.healthbar.alpha = 1;
    self.healthbar.sort = 2;
    self.healthbar.color = (0,1,0);
    self.healthbar setShader("white",128,6);

    self.healthbarback = newclienthudelem(self);
    self.healthbarback.alignX = "left";
    self.healthbarback.alignY = "middle";
    self.healthbarback.horzAlign = "fullscreen";
    self.healthbarback.vertAlign = "fullscreen";
    self.healthbarback.x = x;
    self.healthbarback.y = y;
    self.healthbarback.alpha = 0.5;
    self.healthbarback.sort = 1;
    self.healthbarback.color = (0,0,0);
    self.healthbarback setShader("white",128,10);

    while(1)
    {
    if((isDefined(level.IntermissionTime)) && (level.IntermissionTime > 0))
    {
    self.intermissionTimer setText(game["strings"]["MP_HORDE_BEGINS_IN"]);
    self.intermissionTimer2 setValue(level.IntermissionTime);
    }
    else
    {
    self.intermissionTimer setText("");
    self.intermissionTimer2 setText("");
    }

    if(self.sessionstate != "playing" || !isDefined(self.health) || !isDefined(self.maxhealth))
    {
    self.healthword.alpha = 0;
    self.healthnum.alpha = 0;
    self.healthbar.alpha = 0;
    self.healthbarback.alpha = 0;
    self.healthwarning.alpha = 0;
    wait 0.05;
    continue;
    }
    self.healthword.alpha = 1;
    self.healthnum.alpha = 1;
    self.healthbar.alpha = 1;
    self.healthbarback.alpha = 0.5;
    warninghealth = int(self.maxhealth / 3);
    if(self.health <= warninghealth)
    self.healthwarning.alpha = 1;
    else
    self.healthwarning.alpha = 0;

    width = int(self.health/self.maxhealth*128);
    if(width <= 0)
    width = 1;
    green = (self.health/self.maxhealth);
    red = (1 - green);
    self.healthbar setShader("white", width, 6);
    self.healthbar.color = (red,green,0);
    self.healthnum.color = (red,green,0);
    self.healthnum setValue(self.health);
    wait 0.05;
    }
    }[/php]

    I DON'T KNOW IF THIS IS PART OF IT I BELIEVE IT IS FOR THE BOTS
    [php]for(;
    {
    level.numzombies setValue(AImod\_botUtil::ZombieCount());
    level.zombiesleft setValue(level.BotsForWave - level.RealSpawnedBots);
    level.currentwavenum setValue(level.Wave);

    ******ealth = 0;
    maxhealth = level.BotsForWave * level.ZombieHealth;

    for(i=0; i < level.BotsForWave; i++)
    {
    if(isDefined(level.bots[i]))
    ******ealth += level.bots[i].crate1.health;
    }

    width = int(******ealth/maxhealth * (level.wave_barsize + 4));
    if(width <= 0)
    width = 1;
    if(width != oldwidth)
    level.zombiewavelife scaleOverTime(scaletime,width,8);
    oldwidth = width;

    wait 0.05;
    }
    }[/php]



    [php]ModLoad()
    {

    /* Global Vars */
    //Bots --------------------
    level.MaxWaves = 10;//can change
    level.BotsForIcons = 8;//can change
    level.SpawnedBots = 0;
    level.RealSpawnedBots = 0;
    level.BotsForWave = 0;
    //Waves -------------------
    level.Wave = 0;
    //Game State --------------
    level.zState = "intermission";
    //Ammo Drop ---------------
    level.AmmoDrop = undefined;
    //Intermission Timer ------
    level.IntermissionTimeStart = 15;//can change
    level.IntermissionTime = 0;
    //Brightness --------------
    level.brightness = -0.4;

    /* Init */
    level FuncsMain();
    level precacheItems();
    level thread AImod\_hud::IntermissionCountdown();

    /* Tweakable */
    level.ZombieHealth = 300;//can change
    level.destructibleSpawnedEntsLimit += 300;

    /* Spawn Anti-Glitch spots */
    [[level.SpawnTrigger]] ((1284, 2600, 167), (942, 2604, 51), 50, 100, "mp_terminal");
    [[level.SpawnTrigger]] ((1803, 2502, 140), (1790, 2643, 51), 50, 100, "mp_terminal");

    level thread onPlayerConnect();
    level thread AImod\_hud::HudMain();

    }[/php]

    [php]onPlayerSpawned()
    {
    self endon( "disconnect" );
    self thread AImod\_hud::hud_health();[/php]



    This is what it says on-screen I believe, I never played it.

    [php]precacheItems()
    {
    game["strings"]["MP_HORDE_BEGINS_IN"] = "Zombie Infestation Starts In";
    game["strings"]["MP_CUR_WAVE"] = "Current Wave:";
    game["strings"]["MP_LEFT_TO_SPAWN"] = "Left To Spawn:";
    game["strings"]["MP_ZOMBIES"] = "Zombies:";
    game["strings"]["MP_HEALTH"] = "Health:";
    game["strings"]["MP_NV"]["1"] = "[ ^3[{+actionslot 1}]^7 ]";
    game["strings"]["MP_NV"]["2"] = "[ ^3Nightvision^7 ]";

    precacheString(game["strings"]["MP_HORDE_BEGINS_IN"]);
    precacheString(game["strings"]["MP_CUR_WAVE"]);
    precacheString(game["strings"]["MP_LEFT_TO_SPAWN"]);
    precacheString(game["strings"]["MP_ZOMBIES"]);
    precacheString(game["strings"]["MP_HEALTH"]);
    precacheString(game["strings"]["MP_NV"]["1"]);
    precacheString(game["strings"]["MP_NV"]["2"]);
    }[/php]
    Last edited by ~Just IN~; 11-06-2010 at 07:00 PM.

  3. The Following 2 Users Say Thank You to ~Just IN~ For This Useful Post:

    jimmynguyen3030 (11-06-2010),spiritwo (11-06-2010)

  4. #3
    spiritwo's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Colorado
    Posts
    709
    Reputation
    17
    Thanks
    76
    My Mood
    Happy
    Nice post Just
    /~Thanked
    --
    "Life is tough. It's tougher if you're stupid."

    Spiritwo |






  5. The Following User Says Thank You to spiritwo For This Useful Post:

    ~Just IN~ (11-06-2010)

  6. #4
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh


    I feel specialz again!!! <3



    *cough* i want name change *cough*

  7. #5
    prisma's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    236
    Reputation
    11
    Thanks
    42
    My Mood
    Amazed
    Anyway your code will give a bad syntax because
    [php]self thread resetBrinkOfDeathKillStreakShortly()[/php]
    is missing :P

  8. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,326
    My Mood
    Breezy
    Quote Originally Posted by ~Just IN~ View Post


    I feel specialz again!!! <3



    *cough* i want name change *cough*

    Name Changes can only be requested every 1,000 posts.
    /
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  9. #7
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh
    Quote Originally Posted by master131


    Name Changes can only be requested every 1,000 posts.
    /
    You can give me yours? <3.

    Here is self thread resetBrinkOfDeathKillStreakShortly().

    [php]
    Thread "resetBrinkOfDeathKillStreakShortly()" does not exist in ("AIzombies").
    [/php]

  10. #8
    jimmynguyen3030's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    NukeTown
    Posts
    263
    Reputation
    10
    Thanks
    18
    My Mood
    Bored
    dam this is way to difficult i hav to pull some of the gsc's from the aimod folder 2

  11. #9
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh
    XP

    or do you...?

  12. #10
    zxz0O0's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    209
    Reputation
    10
    Thanks
    136
    My Mood
    Aggressive
    cg_drawhealth 1
    [YOUTUBE]Ja7-WnJcMcs[/YOUTUBE]

Similar Threads

  1. health bar
    By jimmynguyen3030 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 5
    Last Post: 01-23-2011, 07:02 PM
  2. Health Bar mod?
    By ZKPB in forum Combat Arms Mod Discussion
    Replies: 10
    Last Post: 07-08-2010, 05:53 PM
  3. Health bars and Name tags
    By ngh555 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 19
    Last Post: 06-22-2010, 08:44 PM
  4. Health bar and Name tags
    By ngh555 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 1
    Last Post: 06-20-2010, 04:10 PM
  5. hack releases should have poll / health bar (suggestion)
    By djishere in forum Suggestions, Requests & Help
    Replies: 2
    Last Post: 09-05-2009, 12:05 AM