Hmmmm?

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Lethal323

Hmmmm?

Post by Lethal323 » September 26th, 2007, 10:25 pm

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

Lethal323

Post by Lethal323 » September 26th, 2007, 10:54 pm

KillerSam wrote:freeze + burn have already been done in a previous CoDJumper mod by drofder, along with spin.

Oh I did not know

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » September 28th, 2007, 1:56 am

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...)
Image
Image

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Post by YaNo » October 8th, 2007, 9:16 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests