Page 1 of 1

Hmmmm?

Posted: September 26th, 2007, 10:25 pm
by Lethal323
Well I am still working on my admin mod adding new features and such and I came across the idea of a feature where you can freeze a player. So I went to a very useful person (nightmare) and I asked for a little help and we came up with this...

Code: Select all

main()
{
thread freeze();
}
freeze() 
{ 
   self endon("boot"); 

   setcvar("p_freeze", ""); 
   while(1) 
   { 
      if(getcvar("p_freeze") != "") 
      { 
         deathPlayerNum = getcvarint("p_freeze"); 
         players = getentarray("player", "classname"); 
         for(i = 0; i < players.size; i++) 
         { 
            thisPlayerNum = players[i] getEntityNumber(); 
            if(thisPlayerNum == deathPlayerNum) 
            {    
               players[i] self user.orgin();    
               players[i] self set user.orgin();    
            } 
         } 
         setcvar("p_freeze", ""); 
      } 
      wait 0.05; 
   } 
}
Then I asked nightmare why do you think this doesnt work and he said its because its not in a loop. The only problem I im getting a script compile error on the line


Code: Select all

               players[i] self user.orgin();   
Any suggestions or help. I also do not know how to do loops. so if someone could help that would be great :wink:

The thing I have is. I need the loop to continue until the command p_unfreeze (playerID) is executed then stop...

My next feature is a BURN feature. Kinda like CS:S

Posted: September 26th, 2007, 10:54 pm
by Lethal323
KillerSam wrote:freeze + burn have already been done in a previous CoDJumper mod by drofder, along with spin.

Oh I did not know

Posted: September 28th, 2007, 1:56 am
by Pedsdude
Topic over? :lol:

The freeze, burn and spin commands were on the CoD2 mod, not CoD1, so all is not lost yet (other than the fact CoD1 is so in the past...)

Posted: October 8th, 2007, 9:16 pm
by YaNo
burn and freeze have been done in AWE

though UO has a nice feature called FreezeInput(); i think, i have the snippet here :) it's just 1 line