Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. Server fog command

Server fog command

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
1 Posts 1 Posters 848 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Vl.Sunny Offline
    Vl.Sunny Offline
    Vl.Sunny
    wrote on last edited by
    #1

    Couldn't find a way for players to toggle fog without enabling cheats so I made this script.

    Note: This script requires you to install RESXT's main chat_commands script in order to work properly.

    Fog can be toggled on or off by typing your command prefix (default is !) followed by setfog 1 or setfog 0
    e.g. (!setfog 1) in chat

    9b8f3982-f53b-48bf-9401-fb33db221a3c-image.png

    8739b325-ae66-44fa-8e03-0207e74575fe-image.png

    71c7be19-5e17-425a-ad5c-65879e87a4ea-image.png

    Script should be copy and pasted into your plutonium server folder at
    c:\storage\t6\scripts\zm

    #include maps\mp\_utility;
    #include common_scripts\utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\gametypes_zm\_hud_message;
    #include scripts\chat_commands;
    
    Init()
    {
        CreateCommand(level.chat_commands["ports"], "setfog", "function", ::setFogCommand, 1);
    }
    
    setFogCommand(args)
    {
        player = self;
    
        if (args.size != 1)
        {
            player TellPlayer(array("^3Usage: .setfog <0|1>"), 1);
            return;
        }
    
        fogState = int(args[0]);
    
        if (fogState == 0)
        {
            player setClientDvar("r_fog", 0);
            player TellPlayer(array("^1Fog Disabled"), 1);
        }
        else if (fogState == 1)
        {
            player setClientDvar("r_fog", 1);
            player TellPlayer(array("^2Fog Enabled"), 1);
        }
        else
        {
            player TellPlayer(array("^3Invalid fog state. Use 0 or 1."), 1);
        }
    }
    
    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Unread 0
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Donate