Server fog command
-
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


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); } }
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