05.04.2013, 16:48
I'm not entirely sure if it works, but try this:
pawn Код:
CMD:color(playerid, params[])
{
new
iR,
iG,
iB
;
if( sscanf( params, "iii", iR, iG, iB ))
return SendClientMessage( playerid, 0xFFFF00AA, "[USAGE] {FFFFFF}/color [Red] [Blue] [Green] (Values 0 - 255)" );
if(( 256 <= iR <= -1 ) || ( 256 <= iG <= -1 ) || ( 256 <= iB <= -1 ))
return SendClientMessage( playerid, 0xFFFF00AA, "[USAGE] {FFFFFF}/color [Red] [Blue] [Green] (Values 0 - 255)" );
iR &= (( 0xFF << 16 ) | (( iG & 0xFF ) << 8 ) | ( iB & 0xFF ));
SetPlayerColor( playerid, iR );
return true;
}