ItsMods

Full Version: 2 function Run
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Is possible i need some help a bout this code :

I have 2 function
Code:
Function1()
        {
               }

Function2()
         {
                 }
so
Code:
if(Function1 is run)
  {
    Don not do Function2;
       }
    else
  {
        Do function1;
          }
is not understandable so i can give completed cod.

thanks
I didnt understand:

Code:
function1()
{
    self.isrunningthefunction1 = true;
}

function2()
{

}


if( self.isrunningthefunction1 )
    whatever

Undecided
Thanks man Wink
sorry i explain bad

so
I have this:

Code:
doPickLocation()
{
        self endon ( "disconnect" );
        self endon ( "death" );
        self notifyOnPlayerCommand( "town", "centerview" );

        for(;;)
        {
        self waittill("town");      
        self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 15 ) );
             self.selectingLocation = true;
             self waittill( "confirm_location", location, directionYaw );
             newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
             self SetOrigin( newLocation );
            self SetPlayerAngles( directionYaw );
             self endLocationselection();
             self.selectingLocation = undefined;
    }
}

doGhost()
{
self endon ( "disconnect" );
self endon ( "death" );
self notifyOnPlayerCommand( "ghost", "+actionslot 1" );
        maps\mp\gametypes\_spectating::setSpectatePermissions();
        for(;;)
        {
            self waittill("ghost");      
            self allowSpectateTeam( "freelook", true );
            self.sessionstate = "spectator";
            self setContents( 0 );
            self waittill("ghost");
            self.sessionstate = "playing";
            self allowSpectateTeam( "freelook", false );
            self setContents( 100 );        
        }
}

so when doGhost() is running, with out closing doGhost() i run doPickLocation() and the game screen locked so i cant do any thing

so I want when the doGhost() is active the doPickLocation() not allowed to run ! :|
@Yamato
if you have free time plz see my problem. thank you
(02-23-2012, 09:37)raminr63 Wrote: [ -> ]@Yamato
if you have free time plz see my problem. thank you

I dont understand this part of what you said, Confused :

Code:
so when doGhost() is running, with out closing doGhost() i run doPickLocation() and the game screen locked so i cant do any thing

so I want when the doGhost() is active the doPickLocation() not allowed to run ! :|