Solved Zoom in/out

Discussion in 'Plugin Development' started by YoloSanta, Nov 26, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    YoloSanta

    I'm having a bit of trouble, I'm trying to make a guns plugin and what I currently have is when a player left clicks with a Diamond Hoe it zooms in, but what I'm having trouble with is that when I click the same button again I want it to zoom out I'm not exactly sure how to achieve this.

    This is what I currently have;
    https://hastebin.com/qaqayusoli.swift

    Any help is appreciated!
     
  2. Offline

    Zombie_Striker

    @YoloSanta
    The only way that I know of that changes the player's FOV is adding slowness.
     
  3. Offline

    YoloSanta

    I was able to successfully edit the FOV of the player with
    Code:
    player.setWalkSpeed(-0.15F);
    but I wan't it so when I click again it zooms out so I think this is more Event based
     
  4. Offline

    Zombie_Striker

    @YoloSanta
    In that case, check if the player's walk speed is less than the default value (I believe it is 1). If it is, set it back to the default speed. If not, then set the walkspeed to -0.15f.
     
Thread Status:
Not open for further replies.

Share This Page