• Disable the sun.
    4 replies, posted
So on certain maps, the skybox has a sun, for instance, Evocity2_v5p. And if you use a weather plugin with a night cycle, the sun is still there. Can I disable this using lua? Thanks!
[QUOTE=Moat;52215050][lua] hook.Add("InitPostEntity", "Remove Sun", function() game.ConsoleCommand("ent_remove_all env_sun\n") end) [/lua][/QUOTE] Won't work unless server has sv_cheats enabled, even from the server console. [lua] hook.Add("InitPostEntity", "Remove Sun", function() local aSuns = ents.FindByClass("env_sun") for i = 1, #aSuns do aSuns[i]:Remove() end end) [/lua]
[QUOTE=ZIgnorant;52215771]Won't work unless server has sv_cheats enabled, even from the server console. [lua] hook.Add("InitPostEntity", "Remove Sun", function() local aSuns = ents.FindByClass("env_sun") for i = 1, #aSuns do aSuns[i]:Remove() end end) [/lua][/QUOTE] Thanks
Sorry, you need to Log In to post a reply to this thread.