Bool - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Bool (
/showthread.php?tid=105318)
Bool -
MB@ - 28.10.2009
Uum i'm intresed what is bool.
Some people put: new bool: And something Here?
Re: Bool -
dice7 - 28.10.2009
A bool is a value that can only be true or false
Re: Bool -
Correlli - 28.10.2009
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.
Re: Bool -
MB@ - 28.10.2009
oh thank you for your help
Re: Bool -
Sergei - 28.10.2009
Second example in your post about bools won't give warning because true represents 1 and false 0 anyway.
Re: Bool -
Correlli - 28.10.2009
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.
Re: Bool -
Sergei - 28.10.2009
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.
Re: Bool -
UsaBoy91 - 28.10.2009
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 )