Simple FOV Changer

Approved Simple FOV Changer 1.2

No permission to download
therustoldfather updated Simple FOV Changer with a new update entry:

New features!

  • Player commads: /fov basis , /fov normal , /fov high
Basis: 65
Normal: 75
High: 85​
  • Easier management
    • No more error messages*
Code
12814745_985117418232450_8510552258180171664_n.jpg
​

by...

Read the rest of this update entry...
 
  • Like
Reactions: Jakkee
I saw that you were doing multiple "switch" checks in the code. I think you didn't understand how does switch work properly, so I hope this one will be clear for you:

JavaScript:
function On_PlayerConnected(Player)
{
    Player.SendCommand("render.fov 85");
}

function On_Command(Player, cmd, args)
{
    if(cmd == "fov")
    {
        switch(args[0])
        {
            case "basis":
                Player.SendCommand("render.fov 65");
                Player.MessageFrom("FOV Changer", "Your FOV has changed. (65)");   
                break;
            case "normal":
                Player.SendCommand("render.fov 75");
                Player.MessageFrom("FOV Changer", "Your FOV has changed. (75)");
                break;
            case "high":
                Player.SendCommand("render.fov 85");
                Player.MessageFrom("FOV Changer", "Your FOV has changed. (85)");   
                break;
            default:
                Player.MessageFrom("Invalid Command!");
                break;
        }           
    }               
}