[STOCK] Creating customizable fog
Here is a stock i made for creating fog ingame without restarting the server or changing the map
Code:
Its usage is simple: For eg if you want red fog then do this: PHP Code:
2nd argument is the green color content of the fog [Must be a num between 1-255] 3rd argument is the blue color content of the fog [Must be a num between 1-255] 4th argument is the amount of density of the fog [Must be a num between 1-9] To disable fog you can do this: PHP Code:
- The fog only works if you have set your cs display settings to OpenGL and you should set this cvar gl_fog to 1 in order to see the fog - You can change the fog color and density in-game [Using cvars] without restarting the map |
Re: [STOCK] Creating customizable fog
You have fps drops when using this? (I get a drop from 101 to 40 when using smoke)
|
Re: [STOCK] Creating customizable fog
Quote:
|
Re: [STOCK] Creating customizable fog
Quote:
|
Re: [STOCK] Creating customizable fog
Change MSG_ALL to MSG_BROADCAST
|
Re: [STOCK] Creating customizable fog
can you add a Screenshot, please?
|
Re: [STOCK] Creating customizable fog
Quote:
|
Re: [STOCK] Creating customizable fog
Quote:
MSG_BROADCAST: send a msg and trust that it will be read by each player Using MSG_ALL you can get some crash with a lagged server or a high cpu usage. |
Re: [STOCK] Creating customizable fog
Quote:
|
Re: [STOCK] Creating customizable fog
How does this not drop fps?
|
All times are GMT -4. The time now is 13:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.