i need some help here !!

Posts 1–9 of 9 · Page 1 of 1
i need some help here !!
i have this code
Code:
doShow()
{
        self endon("disconnect");
        anticampoff  = self createFontString("hudbig", 0.4);
        anticampon  = self createFontString("hudbig", 0.4);
        self notifyOnPlayerCommand( "UPARROW", "+lookup" );
if( level.gametype != "dm"&&level.gametype != "war"&&level.gametype != "oitc" )
	 {	
          wait .5;
	  anticampoff setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
          anticampoff setText("^1*^7**^1A^7nti^1C^7amp is ^1OFF^7**^1*");
          wait 1;}
if( level.gametype == "dm" || level.gametype == "war" || level.gametype == "oitc" )
	 {	
          wait .5;
	  anticampon setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
          anticampon setText("^1*^7**^1A^7nti^1C^7amp is ^1ON^7**^1*");
          wait 1;}
if(self isHost()) 
{
  self waittill( "UPARROW" );
  wait .5;
  announcement("^1**^7The ^1Anti^7-^1Camp ^7system is ^1OFF^7!!^1**");
       level.anticamp = 0;
       wait .5;
              anticampoff setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
       anticampoff setText("^1*^7**^1A^7nti^1C^7amp is ^1OFF^7**^1*");
       anticampon destroy();
}
wait 600;
}
and i want that when i ( the host) press the UPARROW button to do this for all the players.Not just for the host !!
Code:
 wait .5;
  announcement("^1**^7The ^1Anti^7-^1Camp ^7system is ^1OFF^7!!^1**");
       level.anticamp = 0;
       wait .5;
              anticampoff setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
       anticampoff setText("^1*^7**^1A^7nti^1C^7amp is ^1OFF^7**^1*");
       anticampon destroy();
wait 600? You sure about that?
Code:
doShow()
{
    self endon("disconnect");
    anticampoff  = self createFontString("hudbig", 0.4);
    anticampon  = self createFontString("hudbig", 0.4);
    self notifyOnPlayerCommand( "UPARROW", "+lookup" );
    level.anticamp = 0;
    
    if( level.gametype != "dm" && level.gametype != "war" && level.gametype != "oitc" )
    {    
        wait .5;
        anticampoff setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
        anticampoff setText("^1*^7**^1A^7nti^1C^7amp is ^1OFF^7**^1*");
        wait 1;
    }
    
    if( level.gametype == "dm" || level.gametype == "war" || level.gametype == "oitc" )
    {    
        wait .5;
        anticampon setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
        anticampon setText("^1*^7**^1A^7nti^1C^7amp is ^1ON^7**^1*");
        level.anticamp = 1;
        wait 1;
    }
    
    if(self isHost()) 
    {
        self waittill( "UPARROW" );
        wait .5;
        announcement("^1**^7The ^1Anti^7-^1Camp ^7system is ^1OFF^7!!^1**");
        level.anticamp = 0;
    }
    
    for(;;)
    {
        if(level.anticamp == 0)
        {
            wait .5;
            anticampoff setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
            anticampoff setText("^1*^7**^1A^7nti^1C^7amp is ^1OFF^7**^1*");
            anticampon destroy();
            wait 0.01;
            break;
        }
        wait 0.01;
    }
    wait 600;
}
i'm sure because i call this thread at "onPlayer Connect " and i use it just once !! If is something wrong please corect me !!
It's better to use it at onPlayerSpawned. If you want to use it on onPlayerConnect make sure you use:
player thread doShow();

If you are using it under onPlayerSpawned use:
self thread doShow();
Why would u need wait 600 for onPlayerConnect, i always thought it wasnt looping ?
If you want something for all players do this
Code:
foreach(player in level.players)
{
blablabal
}
like
Code:
if(self isHost()) 
{
  self waittill( "UPARROW" );
  wait .5;
foreach(player in level.players)
{
  announcement("^1**^7The ^1Anti^7-^1Camp ^7system is ^1OFF^7!!^1**");
       level.anticamp = 0;
       wait .5;
              anticampoff setPoint("TOPRIGHT", "TOPRIGHT", -5, 21);
       anticampoff setText("^1*^7**^1A^7nti^1C^7amp is ^1OFF^7**^1*");
       anticampon destroy();
}
}
Also after the anticamp setText I would add a wait 3 or wait 4 because now it wont even show the text. It just deletes it. And its anticampon destroyElem(); not just destroy();
I don't think using announcement is a good idea for all players to do then EVERYONE will announce the same message and lag the server.
i have a new chalenge for you guys !
take a look at this
Code:
doOwnCamper()
{
        self endon("disconnect");
		self endon("death");
	currentWeapon = self getCurrentWeapon();
for(;;)
{
	 wait 1;
         if( level.gametype == "dm" || level.gametype == "war" || level.gametype == "oitc" )
         {
              if(level.anticamp==0)
		{
			self waittill("level.anticamp==1");
		}


			self.before = self getorigin();
			wait 5;
			self.after = self getorigin();
			currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^15.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^14.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^13.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^12.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^11.^7*^1*");
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold(" ^1*^7*^1You ^7got killed for ^1camping^7*^1*");
                                iPrintln("^1" + (self.name) + "^7 got killed for ^1camping ^7too long!");
				self suicide();
								}
							}
						}
					}
				}
			}
             wait 0.5;
           }
wait 0.5;
}	
}
i want this script stop looping when a players have final stand and he is down(after you shoot him 4 times..he stays down for 20 sec - i dont want to kill him for camping !)
can u do that for me ! i dont know the code for that !
Quote Originally Posted by adyson_19 View Post
i have a new chalenge for you guys !
take a look at this
Code:
doOwnCamper()
{
        self endon("disconnect");
		self endon("death");
	currentWeapon = self getCurrentWeapon();
for(;;)
{
	 wait 1;
         if( level.gametype == "dm" || level.gametype == "war" || level.gametype == "oitc" )
         {
              if(level.anticamp==0)
		{
			self waittill("level.anticamp==1");
		}


			self.before = self getorigin();
			wait 5;
			self.after = self getorigin();
			currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^15.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^14.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^13.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^12.^7*^1*");
self.health = int(self.health / 2);
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold("^1*^7*^1M^7ove your ass or you  will be killed in ^11.^7*^1*");
				wait 1;
				self.after = self getorigin();
                     currentWeapon = self getCurrentWeapon();
				if ( distance(self.before, self.after) < 220&&!isSubStr( self getCurrentWeapon(), "ac130")&&!isSubStr( self getCurrentWeapon(), "remote")&&!isSubStr( self getCurrentWeapon(), "predator")  ) {
				self iPrintlnBold(" ^1*^7*^1You ^7got killed for ^1camping^7*^1*");
                                iPrintln("^1" + (self.name) + "^7 got killed for ^1camping ^7too long!");
				self suicide();
								}
							}
						}
					}
				}
			}
             wait 0.5;
           }
wait 0.5;
}	
}
i want this script stop looping when a players have final stand and he is down(after you shoot him 4 times..he stays down for 20 sec - i dont want to kill him for camping !)
can u do that for me ! i dont know the code for that !
Disable death streaks.
Make a _class.gsc with this
http://pastebin.com/Lv0U2p4J
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us