GSC All Players Field of View Modifier

BullyWiiPlaza

Modder
Messages
215
Reaction score
174
Points
818
Since the dvar
Code:
cg_fov
is host only, we need a client-sided function to modify the field of view of other players. Luckily one exists so I made the following script:
Code:
toggleExtendedFieldOfViewEveryone()
{
    if(!isDefined(level.extendedFieldOfView))
    {
        level.extendedFieldOfView = true;
        iPrintlnBold("Extended Field of View ^2ON");
        thread extendedFieldOfViewEveryone();
    }
    else
    {
        level.extendedFieldOfView = undefined;
        iPrintlnBold("Extended Field of View ^1OFF");
        disableExtendingFieldOfViewEveryone();
    }
}

extendedFieldOfViewEveryone()
{
    level endon("stopExtendingEveryonsFieldOfView");

    while(true)
    {
        foreach(player in level.players)
        {
            player setClientFov(90);
        }
    
        wait 0.05;
    }
}

disableExtendingFieldOfViewEveryone()
{
    level notify("stopExtendingEveryonsFieldOfView");

    foreach(player in level.players)
    {
        player setClientFov(65);
    }
}
This can be used on Multiplayer and Zombies so enjoy it guys. Especially on consoles this comes in handy, not so much on PC. :smile:

Note:
It is looped because it resets on respawn for example.

You can see it in action for example in the following video at minute 0:40:
 
Last edited:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,818
Reaction score
2,855
Points
1,053
Since the dvar
Code:
cg_fov
is host only, we need a client-sided function to modify the field of view of other players. Luckily one exists so I made the following script:
Code:
toggleExtendedFieldOfViewEveryone()
{
    if(!isDefined(level.extendedFieldOfView))
    {
        level.extendedFieldOfView = true;
        iPrintlnBold("Extended Field of View ^2ON");
        thread extendedFieldOfViewEveryone();
    }
    else
    {
        level.extendedFieldOfView = undefined;
        iPrintlnBold("Extended Field of View ^1OFF");
        disableExtendingFieldOfViewEveryone();
    }
}

extendedFieldOfViewEveryone()
{
    level endon("stopExtendingEveryonsFieldOfView");
 
    while(true)
    {
        foreach(player in level.players)
        {
            player setClientFov(90);
        }
     
        wait 0.05;
    }
}

disableExtendingFieldOfViewEveryone()
{
    level notify("stopExtendingEveryonsFieldOfView");
 
    foreach(player in level.players)
    {
        player setClientFov(65);
    }
}
This can be used on Multiplayer and Zombies so enjoy it guys. Especially on consoles this comes in handy, not so much on PC. :smile:

Note:
It is looped because it resets on respawn for example.
Really nice, never get this idea. Awesome! :grinning:
 
Top