Jump to content
Sign in to follow this  
StokesMagee

Rainbows | Loop randomize players color.

Recommended Posts

StokesMagee    52

Enjoy... just server-execute this.

if !(isNil "SM_Rainbow") then {terminate SM_Rainbow};
SM_Rainbow = [] spawn
{
    while {true} do
    {
        {
            private _player = _x;
            private _objectTextures = getObjectTextures _player;
            private _color = format["#(rgb,8,8,3)color(%1,%2,%3,1)", random 1, random 1, random 1];
            {
                _player setObjectTextureGlobal [_forEachIndex, _color];
            } forEach _objectTextures;
        } forEach allPlayers;
        uiSleep 0.1;
    };
};

 

Share this post


Link to post
StokesMagee    52
1 hour ago, BigDad said:

What will I see? Different rainbows?

Every player will change to a random color every 0.1 seconds.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×