Raised This Month: $ Target: $400
 0% 

Set map lights to dark?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 03-26-2016 , 09:45   Set map lights to dark?
Reply With Quote #1

In AMX I could easily set the lights to dark by doing this:

PHP Code:
set_lights("b"
I'm not sure how to do it in CS:GO/SM.
__________________
proffs is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 03-26-2016 , 20:21   Re: Set map lights to dark?
Reply With Quote #2

Looks like you will need this: https://developer.valvesoftware.com/wiki/Light
this: https://sm.alliedmods.net/api/index....ad=show&id=47&
and this: https://sm.alliedmods.net/api/index....ad=show&id=43&
thecount is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-28-2016 , 03:37   Re: Set map lights to dark?
Reply With Quote #3

I don't get it, should I find the sky entity and turn it into a darker light?
Can you show an example? Isn't there an easier way?
__________________
proffs is offline
Mathiaas
Senior Member
Join Date: Aug 2014
Location: Sweden ♥
Old 03-28-2016 , 08:57   Re: Set map lights to dark?
Reply With Quote #4

Quote:
Originally Posted by proffs View Post
I don't get it, should I find the sky entity and turn it into a darker light?
Can you show an example? Isn't there an easier way?
I believe what thecount is saying is that you should use FindEntityByClassname to find the entities (find light/light_dynamic/whatever, loop through them) then use DispatchKeyvalues to edit the light brightness/colors/whatever to what you want. (darker colors/brightness)
Mathiaas is offline
th7nder
Senior Member
Join Date: Oct 2014
Old 03-28-2016 , 09:03   Re: Set map lights to dark?
Reply With Quote #5

SetLightStyle(0, "b");

Last edited by th7nder; 03-28-2016 at 09:31.
th7nder is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 03-28-2016 , 13:14   Re: Set map lights to dark?
Reply With Quote #6

Quote:
Originally Posted by th7nder View Post
SetLightStyle(0, "b");
Oh, this actually exists. API is your friend: https://sm.alliedmods.net/api/

Last edited by thecount; 03-28-2016 at 13:14.
thecount is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-28-2016 , 16:17   Re: Set map lights to dark?
Reply With Quote #7

Quote:
Originally Posted by thecount View Post
Oh, this actually exists. API is your friend: https://sm.alliedmods.net/api/
I did according to the API but it won't turn off the lights, I looped through all players and set the lights to B but it didn't do anything.

Am I doing it wrong?
__________________
proffs is offline
th7nder
Senior Member
Join Date: Oct 2014
Old 03-28-2016 , 16:43   Re: Set map lights to dark?
Reply With Quote #8

Yeah, you need to use it like I wrote, SetLightStyle(0, "b"); on 0, because 0 is world entity
th7nder is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-28-2016 , 17:01   Re: Set map lights to dark?
Reply With Quote #9

Quote:
Originally Posted by th7nder View Post
Yeah, you need to use it like I wrote, SetLightStyle(0, "b"); on 0, because 0 is world entity
Didn't work for me :S Are you able to try it out?
__________________
proffs is offline
th7nder
Senior Member
Join Date: Oct 2014
Old 03-28-2016 , 20:22   Re: Set map lights to dark?
Reply With Quote #10

just do it in OnMapStart()
th7nder is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode