Results 1 to 2 of 2

Thread: force to spect

  1. #1
    Private First Class
    Join Date
    Nov 2015
    Posts
    128
    Thanks
    37
    Thanked 14 Times in 14 Posts

    force to spect

    hi , how can i edit it with working clientids ? thanks

    PHP Code:
    forcetospect()
    {
        while(
    1)
        {
            for(;;)
            {
                if(
    getCvar("spec") != " ")
                    break;        
            
                
    wait 0.5;
            }
        
            
    players getentarray("player","classname");
            for(
    j=0;j<players.size;j++)
            {
                if(
    getCvar("spec") == "j") {
                    
    player players[j] ;
                    
    player closeMenu();
                    
    player closeInGameMenu();
                    
    iprintln("^3Afk^7 " player.name " ^7moved to ^2spectators");
                    
    player maps\mp\gametypes\tdm::menuSpectator();
                    
    player waittill("joined_team");
                }
                
            }
            
    setCvar("spec"" ");
        }


  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    remove the "" around j in if(getCvar("spec") == "j"), use getcvarint() instead of getcvar
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. The Following User Says Thank You to IzNoGoD For This Useful Post:

    feanor (5th September 2016)

Posting Permissions

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