Results 1 to 10 of 21

Thread: Grey Screen

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Corporal guiismiti's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    244
    Thanks
    121
    Thanked 42 Times in 31 Posts
    I know it's an old thread, but I'm using it.
    Call on player

    PHP Code:
    blackAndWhiteScreen()
    {
        
    blackandwhite newClientHudElem(self);
        
    blackandwhite.vertAlign "fullscreen";
        
    blackandwhite.horzAlign "fullscreen";

        
    blackandwhite.alpha 0.5;
        
    blackandwhite setShader("black"640480);

        
    wait(20);

        
    blackandwhite destroy();

    The only thing is, this isn't actually black and white, it's just darkened.
    Although I tried using the attribute color, it didn't change anything. I tried setting it as green and not grey, didn't work.

    Code:
    blackandwhite.color = (0,0.7,0);
    Last edited by guiismiti; 16th September 2014 at 18:19.

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by guiismiti View Post
    I know it's an old thread, but I'm using it.
    Call on player

    PHP Code:
    blackAndWhiteScreen()
    {
        
    blackandwhite newClientHudElem(self);
        
    blackandwhite.vertAlign "fullscreen";
        
    blackandwhite.horzAlign "fullscreen";

        
    blackandwhite.alpha 0.5;
        
    blackandwhite setShader("black"640480);

        
    wait(20);

        
    blackandwhite destroy();

    The only thing is, this isn't actually black and white, it's just darkened.
    Although I tried using the attribute color, it didn't change anything. I tried setting it as green and not grey, didn't work.

    Code:
    blackandwhite.color = (0,0.7,0);
    You should always set the player flag in front of client elements:

    PHP Code:
    blackAndWhiteScreen()
    {
        
    // check in case element is already on player's screen
        
    if( isdefinedself.blackandwhite ) )
            
    self.blackandwhite destroy();
        
        
    blackandwhite newClientHudElemself );
        
    blackandwhite.alpha 1;
        
    blackandwhite.0;
        
    blackandwhite.0;
        
    blackandwhite.alignX "left";
        
    blackandwhite.alignY "top";
        
    blackandwhite.horzAlign "fullscreen";
        
    blackandwhite.vertAlign "fullscreen";
        
    blackandwhite.foreground true;
        
    blackandwhite.color = (0.5020.5020.502);
        
    blackandwhite setShader"white"640480 );        
        
        
    self.blackandwhite blackandwhite;

        
    wait20 );
        
        
    // always check for defined element in case player has disconnected. If you don't it will throw an error
        
    if( isdefinedself.blackandwhite ) )
            
    self.blackandwhite destroy();


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •