15.11.2011, 07:03
Some little functions I wrote up now, may be useful may not be useful
pawn Код:
#define setnull(%1) (%1[0]='\0') // similar to slices - Make a string "NULL"
#define inttobool(%1,%2) (%2=!!%1) // INT to BOOL
#define Bit8:%1<%2> %1[(%2) char] // Creates a "CHAR" array, aka a 8bit array
#define Bit8_Get(%1,%2) (%1{%2}) // Gets the "CHAR" array value (pretty self explanatory)
#define SetValue_2D(%1) {_:%1,...} // Sets a value on a "2D" array
new
Text: Hi[5] = SetValue_2D(INVALID_TEXT_DRAW),
Bit8: Yo <5>
;
if(Bit8_Get(Yo, playerid) == 25) return true;