SA-MP Forums Archive
[Question] 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: [Question] Bool (/showthread.php?tid=215735)



[Question] Bool - Anthonyx3' - 24.01.2011

Hey guys i've seen this placed around many gamemodes, so i finally figured to find out, what the hell is it, and how the hell can i use it correctly.

Lets say i would use it in my vehicle system, it would be something like this:
pawn Код:
enum vdata {
    vSQLID,
    vModel,
   
    Owner[MAX_PLAYER_NAME],
    bool:Ownable,
}
Would that be correct use? if so how would i then detect say 0 = un buyable and 1 = buyable? Thanks in advance guys.


Re: [Question] Bool - PeteShag - 24.01.2011

nvm.............


Re: [Question] Bool - Calgon - 24.01.2011

There are no optimization differences between using booleans and integers in PAWN, this is the main reason to why they're used in other programming languages.

I'd personally just stick to integers for PAWN, but it's your choice.