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