Results 1 to 10 of 20

Thread: Time played

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    If you want time in seconds hud wont be difficult.

    Call this function on playerConnected: ( self thread _countTime() )

    and on CallbackStartGametype add:

    precacheString(&"Seconds Played: ");

    PHP Code:
    _countTime()
    {
        
    self endon("disconnect");

        
    self.seconds_HUD newClientHudElem(self);    
        
    self.seconds_HUD.305;
        
    self.seconds_HUD.140;
        
    self.seconds_HUD.alignX "center";
        
    self.seconds_HUD.alignY "middle";
        
    self.seconds_HUD.sort 1;
        
    self.seconds_HUD.alpha 1;
        
    self.seconds_HUD.fontScale 1.3;
        
    self.seconds_HUD.label = &"Seconds Played: ";

        
    self.timeplayed 0;
        
        while(
    1)
        {
            
    wait 1;
            
    self.timeplayed+= 1;
            
    self.seconds_HUD setValue(self.timeplayed);
        }
        

    I hope, I helped you a bit.

  2. The Following User Says Thank You to RobsoN For This Useful Post:

    Ni3ls (12th June 2013)

Posting Permissions

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