Results 1 to 3 of 3

Thread: exp progress bar

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    exp progress bar

    hello
    how make progres bar with exp ? exp 0/100

    waiting bar
    PHP Code:
        time3;
        
    self.progressbackground newClientHudElem(self);
        
    self.progressbackground.horzAlign "fullscreen";
        
    self.progressbackground.vertAlign "fullscreen";
        
    self.progressbackground.alignX "center";
        
    self.progressbackground.alignY "middle";
        
    self.progressbackground.320;
        
    self.progressbackground.340;
        
    self.progressbackground.alpha 0.5;
        
    self.progressbackground setShader("black", (128 4), 12);
        
        
    self.progressbar newClientHudElem(self);
        
    self.progressbar.horzAlign "fullscreen";
        
    self.progressbar.vertAlign "fullscreen";
        
    self.progressbar.alignX "left";
        
    self.progressbar.alignY "middle";
        
    self.progressbar.256;
        
    self.progressbar.340;
        
    self.progressbar.color = (0,1,0); 
        
    self.progressbar setShader("white"08);
        
    self.progressbar scaleOverTime(time1288); 
    Last edited by malyczolg; 29th July 2013 at 20:54.

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    I have no idea what "exp" is, but for examples of a progress bar, look in stock COD2 iw_07.iwd\maps\mp\gametypes\hq.gsc. That has lots of examples of progress bars.

  3. #3
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    I think "exp" mean XP - experience points for level.

    add on CallbackStartGametype

    PHP Code:
        precacheShader("white");
        
    precacheShader("black"); 
    Call this function with self entity eg. on spawnPlayer() or Callback player connect
    PHP Code:
    myProgressBar()
    {
        
    //Here % of progressbar (or your exp), its 20% for example
        
    percent 20;

        
    self.progressbackground newClientHudElem(self);
        
    self.progressbackground.horzAlign "fullscreen";
        
    self.progressbackground.vertAlign "fullscreen";
        
    self.progressbackground.alignX "center";
        
    self.progressbackground.alignY "middle";
        
    self.progressbackground.320;
        
    self.progressbackground.340;
        
    self.progressbackground.alpha 0.7;
        
    self.progressbackground setShader("black"12812);

        
    self.progressbarnewClientHudElem(self);
        
    self.progressbar.horzAlign "fullscreen";
        
    self.progressbar.vertAlign "fullscreen";
        
    self.progressbar.alignX "center";
        
    self.progressbar.alignY "middle";
        
    self.progressbar.320;
        
    self.progressbar.342;
        
    self.progressbar.alpha 0.7;
        
    self.progressbar setShader("white"128*(percent*0,01), 8);

    Last edited by RobsoN; 30th July 2013 at 15:09.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •