Add some value to alpha
#1

pawn Код:
case 1:
        {
            AlphaValue[playerid] += 5;
            PlayerTextDrawBoxColor(playerid, SerwerData[E_PLAYER_DARK_SCREEN], 0x000000(AA)?);
            if(AlphaValue[playerid] == 255)
            {
                Phase[playerid] = 2;
                SetPlayerPos(playerid, X, Y, Z);
                SetPlayerFacingAngle(playerid, A);
                SetPlayerInterior(playerid, Interior);
                SetPlayerVirtualWorld(playerid, Virtualworld);
            }
        }
       
        case 2:
        {
            AlphaValue[playerid] -= 5;
            PlayerTextDrawBoxColor(playerid, SerwerData[E_PLAYER_DARK_SCREE], 0x000000(AA)?);
            if(AlphaValue[playerid] == 255)Phase[playerid] = -1;
        }
    }
How to add some alpha value every time when timer will be called? Found some scripts like HexToRGBA or ****** RRGGBB topic but can't get it..
Reply
#2

Use the bitiwse OR operator, I suppose.

Код:
0xAA | 0x11 = 0xBB
Reply
#3

Hm? Values should be:
pawn Код:
0x00000011, 0x00000022, 0x00000033, 0x00000044, 0x00000055, 0x00000066, 0x00000077, 0x00000088, 0x00000099, 0x000000AA, 0x000000BB, 0x000000CC, 0x000000DD, 0x000000EE, 0x000000FF
And then after i pass "FF":

FF to 11 alpha value.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)