28.11.2010, 19:27
(
Последний раз редактировалось Slice; 28.11.2010 в 19:41.
)
Workaround for the bug in format/printf when putting long hex numbers:
Using GetPlayerColor for the new text coloring in 0.3c:
pawn Код:
#include <a_samp>
#define HEXNUM "%04h%04h"
#define PRINTHEX(%0) ( ( ( %0 ) & ( 0xFFFF0000 ) ) >>> 16 ), ( ( %0 ) & ( 0xFFFF ) )
public OnFilterScriptInit( )
{
printf( "Bad: %x.", 0xFFFFFFFF );
printf( "Good: " HEXNUM ".", PRINTHEX( 0xFFFFFFFF ) );
}
Using GetPlayerColor for the new text coloring in 0.3c:
pawn Код:
#define StripAlpha(%0) ( ( %0 ) >>> 8 )
format( .., .., "blablalba{%h}blabla", StripAlpha( GetPlayerColor( playerid ) ) );