28.10.2009, 21:18
bool is good if you need a variabile to check it if is 1 or 0
e.g:
Bool is specifed for binary base ( 0 - false ; 1 - true )
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.");
}