ultranewbie

how to set cg_fovscale more than 2 for a clients

Recommended Posts

 

i tried to give cg_fovscale to more than 2 for clients with the following script

init.gsx

switch( self.pers[ "fov" ] )
    {
        case 0:
            self setClientDvar( "cg_fovscale", 1.0 );
            self setClientDvar( "cg_fov", 80 );
            break;
        case 1:
            self setClientDvar( "cg_fovscale", 1.125 );
            self setClientDvar( "cg_fov", 80 );
            break;
        case 2:
            self setClientDvar( "cg_fovscale", 1.25 );
            self setClientDvar( "cg_fov", 80 );
            break;
    	case 3:
            self setClientDvar( "cg_fovscale", 3.0 );
            self setClientDvar( "cg_fov", 80 );
            break;
    	case 4:
            self setClientDvar( "cg_fovscale", 4.0 );
            self setClientDvar( "cg_fov", 80 );
            break;
    	case 5:
            self setClientDvar( "cg_fovscale", 5.0 );
            self setClientDvar( "cg_fov", 80 );
            break;
        default:
            break;
    }

sciptcommand.gsx

case "fov":
            if( self.pers["fov"] == 1 )
            {
                self iPrintlnBold( "Field of View Scale: ^11.0" );
                self setClientDvar( "cg_fovscale", 1.0 );
                self setClientDvar( "cg_fov", 80 );
                self setstat( 3161, 0 );
                self.pers[ "fov" ] = 0;
            }
            else if( self.pers["fov"] == 0 )
            {
                self iPrintlnBold( "Field of View Scale: ^11.25" );
                self setClientDvar( "cg_fovscale", 1.25 );
                self setClientDvar( "cg_fov", 80 );
                self setstat( 3161, 2 );
                self.pers[ "fov" ] = 2;
            }
            else if( self.pers["fov"] == 2 )
            {
                self iPrintlnBold( "Field of View Scale: ^11.125" );
                self setClientDvar( "cg_fovscale", 1.125 );
                self setClientDvar( "cg_fov", 80 );
                self setstat( 3161, 3 );
                self.pers[ "fov" ] = 3;
            }
            else if( self.pers["fov"] == 3 )
            {
                self iPrintlnBold( "Field of View Scale: ^13" );
                self setClientDvar( "cg_fovscale", 3.0 );
                self setClientDvar( "cg_fov", 80 );
                self setstat( 3161, 4 );
                self.pers[ "fov" ] = 4;
            }
            else if( self.pers["fov"] == 4 )
            {
                self iPrintlnBold( "Field of View Scale: ^14" );
                self setClientDvar( "cg_fovscale", 4.0 );
                self setClientDvar( "cg_fov", 80 );
                self setstat( 3161, 5 );
                self.pers[ "fov" ] = 5;
            }
            else if( self.pers["fov"] == 5 )
            {
                self iPrintlnBold( "Field of View Scale: ^15" );
                self setClientDvar( "cg_fovscale", 5.0 );
                self setClientDvar( "cg_fov", 80 );
                self setstat( 3161, 1 );
                self.pers[ "fov" ] = 1;
            }
            break;

hear is the result of the code ,,  say  5.0 is not a valid value for dvar 'cg_fovscale'

shot0000.thumb.jpg.8f3ba78d13014410c5c5f2fe6fb66523.jpg

how to get it have fovscale more than 2 what i am missing.

thank you

Edited by ultranewbie

Share this post


Link to post
Share on other sites

As you see in the console it says "Domain is any number from 0.2 to 2" 

So you cannot set it to above 2 as this is the upper limit

Same goes for setting it below 0.2 as this is the lower limit.

 

Share this post


Link to post
Share on other sites

sorry my bad ,, i though i was puting 1.3, 1.4 , 1.5 ..... instead i placed 3,4,5 😅 😅 😅

Edited by ultranewbie
  • Haha 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.