Author Topic: AoT V3 Sources!  (Read 1181 times)

Post your sources in this topic.

Something like this

Code: [Select]
function serverCmdarenarespawn(%x)
{
  if(%x.player.isinRing $="1")
      {
       %x.player.setDamageLevel(0);
        %x.player.setTransform("401.886 437.511 936.775");
        %x.player.isinRing=0;
                  }
                   else
                   {
   commandtoserver('respawn');
 }
}
 

I am not sure what the $= operator looks for, but I am still fairly sure you are using 0 for true and 1 for false.

1 is true -.- 0 is false *sigh*

Badspot

  • Administrator
$= is the string comparison operator.  It's faster to use == if you're just looking for true or false

1 is true -.- 0 is false *sigh*

I know that's how it's usually done, but in your method you spawn them in the arena... then set isinring to 0...
As well as that you only spawn them if isinring == 1...

Code: [Select]
function serverCmdarenarespawn(%x) //THE FUNCTION
{
  if(%x.player.isinRing $="1") // CHECKS IF PLAYER IS IN THE RING
      {
       %x.player.setDamageLevel(0); // IF THEY ARE SETS THEIR DAMAGE TO 0 (fULL hEALTH)
        %x.player.setTransform("401.886 437.511 936.775"); //SPAWNS THEM OUT.
        %x.player.isinRing=0; //SETS ISINRING TO 0 SO THEY CAN'T CHEAT
                  }
                   else
                   {
   commandtoserver('respawn'); // IF THEY ARE NOT IN THE RING THEY WILL JUST SPAWN
}
}



sooooo... if they are out of the ring how do you put them in?  Perhaps you should make an attempt as to telling what this is used for.

I use my teleporter i made to put them in.