# Thread: Explain how this works...

1. ## Explain how this works...

If (player.hasbighead); Can someone explain me how this works? Thanks.

2. were you found the code or did you make the bighead part up?

3. Ye i made that Wait, gonna post the code.

4. Originally Posted by TechnoX
Ye i made that Wait, gonna post the code.

?

5. Yes like that, now can someone explain how it works, pleas?

6. Originally Posted by TechnoX
Yes like that, now can someone explain how it works, pleas?
@TechnoX

Depens on how you gone use:

// means if something is true, it will do whats below here
player sayall("I try");
}
you can also use it for other things like:
if(i == 5){
self sayall("Yeh");
}
means if the i is 5, it will do something thats below.
if not.
it don't do it.

EDIT:
More: ( The IF statment)

i = 5;
if(i == 5){
self sayall("The value is 5");
}

self waittill("death");
i = 0;
if(i == 0){
self sayall("The value is now 0");
}
EDIT: more... (The ELSE statment)

i = 5;
if(i == 5){
self sayall("The value is 5");
}
else
{
self sayall("The value is not 5");
}
self waittill("death");
i = 0;
if(i == 0){
self sayall("The value is now 0");
}
else
{
self sayall("The value is not 0");
}
The else means if the IF is not right, it will do the ELSE

7. Nice, thanks.

8. Originally Posted by TechnoX
What does else mean...
You saw below?

It will do something if the IF statment is false (Not right/correct)

9. Edited it before you posted, your a fast guy

10. Originally Posted by TechnoX
Edited it before you posted, your a fast guy
Yeh, I have to try to do that.....

So you can feel you get fast answers

(But, for 3 days after today. I won't be answering here )

11. 0 = false
1 (or higher) = true

if(self isHost() == 1) is the same as if(self isHost())
if(self isHost() == 0) is the same as if(!self isHost())

/marked as solved