10-01-2011, 10:04
You can use this to set checkpoints and see if he completed that one already
here's an example
Code:
playerCheckpoint( name )
{
return( isDefined( self.Checkpoints[ name ] ) );
}
getPlayerCheckpoint( name )
{
if( !isDefined( self.Checkpoints[ name ] ) )
return undefined;
return self.Checkpoints[ name ];
}
setPlayerCheckpoint( name, arg )
{
if( !isDefined( self.Checkpoints ) )
self.Checkpoints = [];
if( !isDefined( arg ) )
arg = true;
self.Checkpoints[ name ] = arg;
}
clearPlayerCheckpoint( name )
{
self.Checkpoints[ name ] = undefined;
}
here's an example
Code:
thing()
{
self setPlayerCheckpoint( "thing" );
while( playerCheckpoint( "thing" ) )
{
if( randomInt( 250 ) < 25 )
self clearPlayerCheckpoint( "thing" );
wait 1;
}
// blablabla
}
(08-10-2011, 12:58)Pozzuh Wrote:Se7en Wrote:Stealed, from cod4 mod ...look who's talking
[Release] Old School Mod v2.2
[Release] Scroll menu