Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. local LUA_menu_MISC = gui.Reference("SETTINGS", "MISCELLANEOUS")
  2. local LUA_sun_slider_x = gui.Slider(LUA_menu_MISC, "LUA_sun_slider_x", "Sun Controll X", 0, -180, 180)
  3. local LUA_sun_slider_y = gui.Slider(LUA_menu_MISC, "LUA_sun_slider_y", "Sun Controll Y", 0, -180, 180)
  4. local LUA_sun_slider_z = gui.Slider(LUA_menu_MISC, "LUA_sun_slider_z", "Sun Controll Z", 0, -180, 180)
  5. local sun
  6. local controll_x
  7. local controll_y
  8. local controll_z
  9. function sun_stuff()
  10.    sun = entities.FindByClass("CCascadeLight")[1]
  11.    if sun ~= nil then
  12.       controll_x = gui.GetValue("LUA_sun_slider_x")
  13.       controll_y = gui.GetValue("LUA_sun_slider_y")
  14.       controll_z = gui.GetValue("LUA_sun_slider_z")
  15.       sun:SetPropVector({controll_x,controll_y,controll_z},"m_envLightShadowDirection")
  16.    end
  17. end
  18. callbacks.Register("Draw", sun_stuff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement