Results 1 to 7 of 7

Thread: Auto Timeleft Writer Script to Hostname

  1. #1
    Private
    Join Date
    Sep 2013
    Posts
    13
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Auto Timeleft Writer Script to Hostname

    Sorry My English Bad i Am Do This Script
    Code:
    main() 
    { 
    thread time(); 
    } 
    
    time() 
    { 
    level endon("boot"); 
    
    setcvar("g_time", ""); 
    
    while(1) 
    { 
    s="^1Server Name"; 
    s+="^2Nextmap For Timeleft: ^3"; 
    s+=int((getCvarFloat("scr_tdm_timelimit")) - ((getTime() - level.starttime) / 60000)); 
    s+=" dk. "; 
    s+="Pwd:Default Xfire:hayro14"; 
    setcvar("sv_hostname",s); 
    
    wait 0.05; 
    } 
    }

  2. #2
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    check this:

    PHP Code:
    checkTimeLimit()
    {
        if(
    level.timelimit <= 0)
        return;
        
        
    timepassed = (getTime() - level.starttime) / 1000;
        
    timepassed timepassed 60.0;
        
        
    timeleft int(level.timelimit timepassed);
        
    setCvar("sv_hostname","Time Left " timeleft "min");
        
    setCvar("_Time_Left",""timeleft +" mins(+)"); 
        
        
    seconds_left int ((level.starttime level.timelimit 60 1000 getTime () + 500) / 1000);
        if(
    timepassed level.timelimit)
        return;
        
        if(
    level.mapended)
            return;
        
    level.mapended true;
        
        if(!
    level.splitscreen)
        
        
    level thread endMap();


  3. The Following 4 Users Say Thank You to malyczolg For This Useful Post:

    kung foo man (25th October 2013),Ni3ls (24th October 2013),Rocky (24th October 2013),thOuMta (24th October 2013)

  4. #3
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    I don't usually question why anyone would want something done in a mod, but this one just beggers belief - you want to change your hostname to the time left in a game? That's just bonkers. One of those, where you know it can be done, but you need to question why you would do it in the first place.

  5. #4
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Well there's a simple answer to it, on some servers, zombie especially, people are joining the game at the start of a new map and so they need to know when does it start because it takes some time to join it and check it for yourself, I know it doesn't take that much time but when you do this more often it can get irritating. The reason for this is that it is not worth joining a zombie server in half game etc. because in most cases you wouldn't get to play as a Hunter on the current map.

    Hope it makes it a bit clearer to understand why people like to have a time left timer in their hostname.

  6. #5
    Private
    Join Date
    Sep 2013
    Posts
    13
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Allies Axis Rounds Played SCripts ?

    Svname. [Allies 16|Axis 5] Rounds Played 21/20 What is This SCripts ?

  7. #6
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    sd , tdm ?

  8. #7
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    Quote Originally Posted by Tally View Post
    I don't usually question why anyone would want something done in a mod, but this one just beggers belief - you want to change your hostname to the time left in a game? That's just bonkers. One of those, where you know it can be done, but you need to question why you would do it in the first place.
    Lame modders cant write complex scripts, so they have to be achieved with these simple lines. They cant understand if they wanna an outstanding server then they have to learn more about scripting. Therefore there are so many stupid questions and requests.

  9. The Following User Says Thank You to randall For This Useful Post:

    RobsoN (27th October 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
  •