Grass On Off

Discussion in 'DayZ Mod' started by WagnerMello, Sep 7, 2016.

  1. WagnerMello

    WagnerMello Member

    Joined:
    Jul 18, 2016
    Messages:
    38
    Likes Received:
    0
    Hello guys I saw in a server where the player can remove or add grass on the server by mouse
    I would like to have this script but I did not find anywhere someone would have this script?
    thx
     
  2. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    697
    Likes Received:
    83
    I have a dialog for a player menu for different options players can use, kinda hard to single out just the grass part.

    The code for grass on or off is this tho could do it in a scroll menu:
    Code:
    if (isnil "player_grass") then {
        player_grass = false;
    };
    if (player_grass) then {
        setTerrainGrid 25;
        systemchat "Grass turned on.";
        player_grass = false;
    } else {
        setTerrainGrid 50;
        systemchat "Grass turned on.";
        player_grass = true;
    };
    
     
  3. WagnerMello

    WagnerMello Member

    Joined:
    Jul 18, 2016
    Messages:
    38
    Likes Received:
    0
    hello Innko
    I put this script you gave me to work to put admin works fine but regular player it disappears and appears again

    I use Infistar put up this permission player_grass however did not work

    thx
     
  4. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    697
    Likes Received:
    83
    In AH.sqf there is something you need to remove. Search for setTerrainGrid and I think it should just be 1 line that needs to be removed and that'll resolve the issue.
     
  5. WagnerMello

    WagnerMello Member

    Joined:
    Jul 18, 2016
    Messages:
    38
    Likes Received:
    0
    I took this line did not work
    / * Force Terrain Grid? * / FTG = 25; / * 50, 25, 12.5 * / / * recommended 25 * / / * if Set to 50 grass will be very low for better client FPS * /
     
  6. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    697
    Likes Received:
    83
    in AH.sqf not AHConfig.sqf.

    In AH.sqf there is a line that is something like setTerrainGrid _FTG; and you just need to remove that line.
     
  7. WagnerMello

    WagnerMello Member

    Joined:
    Jul 18, 2016
    Messages:
    38
    Likes Received:
    0
    hello removed this setTerrainGrid _ft line; my AH.sqf and worked however the Infistar for work
     
  8. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    697
    Likes Received:
    83
    What do you mean? It worked? or you changed that line and broke the AH.sqf?
     
  9. WagnerMello

    WagnerMello Member

    Joined:
    Jul 18, 2016
    Messages:
    38
    Likes Received:
    0
    I will try to be clearer
    I removed this line "setTerrainGrid _ft;" and the script of grass work

    however the infistar stopped working
     

Share This Page