ItsMods

Full Version: Code color crosshairs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I apologize for my English, I write through Google translator.

I need to color code the crosshairs of fashion AIZombies eXtreme 2.0
he can not find it (((

http://www.itsmods.com/forum/Thread-Prev...layer.html
It's just a random number between 0-1 for each color :c

Anyway to not override the original GSC this is what'll you do
Code:
onPlayerConnect()
{
    self endon("disconnect");
    for(;;)
    {
        level waittill( "connected", player);
        player thread hitmarkerColor();
    }
}

hitmarkerColor()
{
    while ( true )
    {
        while( !isDefined( self.hud_damagefeedback ) )
        {
            wait 0.5;
        }

        self.hud_damagefeedback.color = getGoodColor();
        wait 0.5;
    }
}

getGoodColor()
{
    color = [];    //Array as Vector3
    
    for( i=0;i<3;i++)
    {
        color[i] = randomint( 2 );
    }
    
    if( color[0] == color[1] && color[1] == color[2] )
    {
        rand = randomint(3);
        color[rand] += 1;
        color[rand] %= 2;
    }
    
    return ( color[0], color[1], color[2] );
}
-Made by momo5502
You could've opened the IWD and checks scripts/functions.gsc <_<
It's Fashion. Damn russian guy/translator.

@DidUknowiPwn - why using random colors ?... also like he knows what is gsc.
DidUknowiPwn, Thanks for the help