#1

Uum i'm intresed what is bool.

Some people put: new bool: And something Here?
Reply
#2

A bool is a value that can only be true or false
Reply
#3

Also check this - http://forum.sa-mp.com/index.php?top...4797#msg784797

And like dice7 said, bool: tag can only return 0 which is false or 1 which is true.
Reply
#4

oh thank you for your help
Reply
#5

Second example in your post about bools won't give warning because true represents 1 and false 0 anyway.
Reply
#6

Quote:
Originally Posted by $ЂЯĢ
Second example in your post about bools won't give warning because true represents 1 and false 0 anyway.
In some cases it will.
Reply
#7

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by $ЂЯĢ
Second example in your post about bools won't give warning because true represents 1 and false 0 anyway.
In some cases it will.
Don't forget to post here when you find that case.
Reply
#8

bool is good if you need a variabile to check it if is 1 or 0

e.g:
pawn Code:
new bool: a[200];

//onplayercommandtext

if(!strcmp(cmdtext,"/test",true))
{
   if(a[playerid] == true) // a[playerid] or a[playerid] == true
   {
     SendClientMessage(playerid,COLOR_WHITE,"You are aleardy admin.");
     return 1;
   }
   a[playerid] = 1;
   SendClientMessage(playerid,COLOR_WHITE,"You are now admin.");
}
Bool is specifed for binary base ( 0 - false ; 1 - true )

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)