What's new

Discussion [2313453] Timed Process monitor :)

Z

zy0n

Enthusiast
Messages
900
Reaction score
449
Disclaimer: If you don't know what this can be used for... this code isn't for you :tongue:
Code:
timedPro( pname, waitTime, reset ){

if ( !isDefined( self.isProcess[pname]["active"]) ){
self.isProcess[pname]["start"] = getTime();
self.isProcess[pname]["active"] = true;
self.isProcess[pname]["wait"] = waitTime*1000;
return false;
} else {
if ( ( getTime() - self.isProcess[pname]["start"] ) > self.isProcess[pname]["wait"] ){
if ( isDefined( reset ) && reset ) self thread killTimedPro( pname );
return true;
}
else return false;
}
}

killTimedPro( pname ){
self.isProcess[pname]["active"] = undefined;
}

Usage:
Code:
if ( timedPro( <name>, <wait time> )); //Creates/Monitors process wait time
self thread killTimedPro( <name> ); //Removes the process.

Example Usage Test:

Code:
self thread timerTEST(); //put this onPlayerSpawned();

timerTEST(){

for(;;){
if ( timedPro( "test", 5, true ) ){
self iPrintlnBold("TIMES UP");
wait 2;
}
else self iPrintlnBold( "Still Ticking" );	

wait .2;
}
}
 
C

Compton Mods

Enthusiast
Messages
408
Reaction score
85
Good job! :smile:

I'm definitely going to have fun with this!
tongue.gif
 
X

xVVhiteboy

Contributor
Messages
2,908
Reaction score
662
I wish I could see a video, lent my friend my jtag :frown:
 
X

xVVhiteboy

Contributor
Messages
2,908
Reaction score
662
It'll print Still ticking, till it hits 5 seconds, and then it'll say times up and then restart :smile:
Oh lol, I should have looked harder lol, This will be fun for verification.
 
A

Andrew74

Enthusiast
Messages
824
Reaction score
219
I'm guessing this is a timer for verification...

If thats the case there is better codes to use for that.
 
Z

zy0n

Enthusiast
Messages
900
Reaction score
449
I'm guessing this is a timer for verification...

If thats the case there is better codes to use for that.

you're guess is wrong... lolz and better codes... haha mr godmode releaser... roflz

This code can be used for a plethora of different things.
 
A

Andrew74

Enthusiast
Messages
824
Reaction score
219
you're guess is wrong... lolz and better codes... haha mr godmode releaser... roflz

This code can be used for a plethora of different things.

Maybe later I'll release no recoil LOL. =)
 
J

JustTry2StopMe

#MaddenKiller
Retired
Messages
4,144
Reaction score
898
I likes :tongue:
 
S

Soup1d

Newbie
Messages
13
Reaction score
0
So i am not sure if im correct, but i think this can be used for.... Im not going to say to respect the OP. But ill PM you. Tell me if im right.
 
M

MgK

Enthusiast
Messages
372
Reaction score
113
did u just call me a noob lol, im not the one relesing bulls***,
plus a word of advice take your girl of your sig lol
 
M

MgK

Enthusiast
Messages
372
Reaction score
113
lol she really is u see that sexy smile lol
 
Top Bottom