Log in

View Full Version : if(IsFKeyDown(12))then



Jason2gs
02-22-2007, 02:48 AM
Tell me if I have this set up right...

if(IsFKeyDown(12))then
begin
wait(500+random(100));
Logout;
wait(500+random(100));
LoginPlayer(True);
end;

if(IsFkeyDown(10))then
begin
wait(500+random(100));
Logout;
wait(500+random(100));
LoginPlayer(False);
end;

That means that if I punch in F12, that means to log out the current player, and that he is still good and can be used later on.

But if I punch in F10... it means to log out and that the current player got himself into something he(I) can't get out of.

Right? Gotta go, bye!

Ejjman
02-22-2007, 03:21 AM
So, no, I think you got it confused, as do many people with the true statements and stuff.

NextPlayer(False) means go to the next player, leaving the current one false, or taking him out of the loop.

NextPlayer(True) means go to the next player, leaving the current one true, or leaving him in the loop.

Look at what I did.

if(IsFKeyDown(12))then
begin
wait(500+random(100));
NextPlayer(True);
end;

if(IsFkeyDown(10))then
begin
wait(500+random(100));
NextPlayer(False);
end;

See what I did? I think you should understand now ;)

Boreas
02-22-2007, 03:40 AM
Yea that's right. Remember this will only work if the button is being held down when the script reads the line with the if. So you will have to give it plenty of chance to check.

Jason2gs
02-22-2007, 06:27 PM
Ah, alright. Thanks =)