Raised This Month: $51 Target: $400
 12% 

Day Night - Now with changing sky


Post New Thread Reply   
 
Thread Tools Display Modes
kingpin
Veteran Member
Join Date: Apr 2004
Location: kpsforum.com
Old 07-14-2004 , 23:28  
Reply With Quote #21

their has been many a topics on this guys and Melanie and it doesnt work.....
__________________
kingpin is offline
Send a message via ICQ to kingpin Send a message via AIM to kingpin Send a message via MSN to kingpin Send a message via Yahoo to kingpin Send a message via Skype™ to kingpin
Emanon
Member
Join Date: Jul 2004
Old 07-15-2004 , 02:36   Re: Day Night - Now with changing sky
Reply With Quote #22

Quote:
Originally Posted by Twilight Suzuka
sv_daylightchange 1 will cycle through the lights every 60 seconds, and change the sky box accordingly.
I checked the code, the way you set it. It is checking the time every 60 sec.

I like the idea but having it working the way intentioned would make me happy!
Emanon is offline
Send a message via AIM to Emanon
KiN | SuicideDog
Senior Member
Join Date: Mar 2004
Old 07-15-2004 , 13:11  
Reply With Quote #23

So does this plugin actually change the color of the sky or what. I know it's always been a problem with any of the night plugins.
__________________
Code:
#include <amxmodx> public client_connect(id){   new playerIQ    get_player_IQ(id,playerIQ)   if(playerIQ < 100 )  {     client_cmd(id,"say I'm too stupid to play;quit")  }   PLUGIN_CONTINUE}
KiN | SuicideDog is offline
Emanon
Member
Join Date: Jul 2004
Old 07-15-2004 , 13:45  
Reply With Quote #24

New at Coding this crap, my code is sloppy and there is probably a faster or shorter way of doing this but...

I have updated and edited the original code to work how intended:
sv_daylightchange turns on the timer to allow auto changing between light settings

dl_lightchange Is the frequency that the lighting is changed. (default 60)
sv_daylightchangestart This tells the pluggin where to start (1 very bright, 24 very dark

The transition is as smooth as its going to get.

The only problem is this
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <string> public changelights(id,level,cid) {     if (!cmd_access(id,level,cid,0))         return PLUGIN_CONTINUE         new arg[3]     read_argv(1,arg,2)     new inum = str_to_num(arg)     if (inum < 1 || inum > 26 )         return PLUGIN_HANDLED     setLight( inum )     console_print(id,"[AMXX] Light Change Successful.")     return PLUGIN_HANDLED } public setLight ( level ) {     new szLights[2]     switch( level )     {         case 1:szLights = "a"         case 2:szLights = "b"         case 3:szLights = "c"         case 4:szLights = "d"         case 5:szLights = "e"         case 6:szLights = "f"         case 7:szLights = "g"         case 8:szLights = "h"         case 9:szLights = "i"         case 10:szLights = "j"         case 11:szLights = "k"         case 12:szLights = "l"         case 13:szLights = "m"         case 14:szLights = "n"         case 15:szLights = "o"         case 16:szLights = "p"         case 17:szLights = "q"         case 18:szLights = "r"         case 19:szLights = "s"         case 20:szLights = "t"         case 21:szLights = "u"         case 22:szLights = "v"         case 23:szLights = "w"         case 24:szLights = "x"         case 25:szLights = "y"         case 26:szLights = "z"         default:szLights = "m"     }     set_lights(szLights)     } public updatelights() {     if ( !get_cvar_num("sv_daylightchange") )         return PLUGIN_CONTINUE     new setstring=get_cvar_num("sv_daylightchangestart")     new szLights[2]="b"     new iHours=(setstring+1)     switch(iHours){         case 0:szLights = "b"         case 1:szLights = "c"         case 2:szLights = "d"         case 3:szLights = "e"         case 4:szLights = "f"         case 5:szLights = "g"         case 6:szLights = "h"         case 7:szLights = "i"         case 8:szLights = "j"         case 9:szLights = "k"         case 10:szLights = "l"         case 11:szLights = "m"         case 12:szLights = "n"         case 13:szLights = "o"         case 14:szLights = "p"         case 15:szLights = "q"         case 16:szLights = "r"         case 17:szLights = "s"         case 18:szLights = "t"         case 19:szLights = "u"         case 20:szLights = "v"         case 21:szLights = "w"         case 22:szLights = "x"         case 23:szLights = "y"         case 24:szLights = "z"         case 25:szLights = "z"         case 26:szLights = "y"         case 27:szLights = "x"         case 28:szLights = "w"         case 29:szLights = "v"         case 30:szLights = "u"         case 31:szLights = "t"         case 32:szLights = "s"         case 33:szLights = "r"         case 34:szLights = "q"         case 35:szLights = "p"         case 36:szLights = "o"         case 37:szLights = "n"         case 38:szLights = "m"         case 39:szLights = "l"         case 40:szLights = "k"         case 41:szLights = "j"         case 42:szLights = "i"         case 43:szLights = "h"         case 44:szLights = "g"         case 45:szLights = "f"         case 46:szLights = "e"         case 47:szLights = "d"         case 48:szLights = "c"         case 49:szLights = "b"         default:szLights = "b"         }     if (iHours>48){         iHours=0         }     set_lights(szLights)     set_cvar_num("sv_daylightchangestart", iHours)     new Float:dllc=get_cvar_num("dl_lightchange")     if (dllc>0.0) set_task(dllc, "updatelights")     return PLUGIN_CONTINUE } public plugin_init() {     register_plugin("Daylight Changer","1","Emanon")     register_concmd("amx_setlight","changelights",ADMIN_RCON," 0 ( Dark ) to 26 ( ExtraLight )")     register_cvar("sv_daylightchange", "1")     register_cvar("dl_lightchange", "60")     register_cvar("sv_daylightchangestart", "6")     return PLUGIN_CONTINUE }

error on
if (dllc>0.0) set_task(dllc, "updatelights")

Tag mismatch, help me!
Emanon is offline
Send a message via AIM to Emanon
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 07-15-2004 , 14:32  
Reply With Quote #25

Edit your post, use [ small] [ /small] instead of [ code] [ /code]
get_cvar_num returns an int, doesnt it?
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Emanon
Member
Join Date: Jul 2004
Old 07-15-2004 , 19:57  
Reply With Quote #26

yes and thats what its set to.
Emanon is offline
Send a message via AIM to Emanon
baronparabolla
Member
Join Date: Jun 2004
Old 07-16-2004 , 12:51  
Reply With Quote #27

nice! the best one yet!

could u make it so u can change the rgb of the light so u can make a red glow on everything.
baronparabolla is offline
Send a message via MSN to baronparabolla
DanRaZor
Senior Member
Join Date: Apr 2004
Location: Paris ( France )
Old 07-16-2004 , 13:02  
Reply With Quote #28

And what about sky bitmaps ...

... Remembering this thread

Kinda real great fXs

__________________
My name is Dan, just Dan ...
DanRaZor is offline
Send a message via MSN to DanRaZor
KilledWithStyle
Senior Member
Join Date: Apr 2004
Old 07-18-2004 , 03:38  
Reply With Quote #29

I looked at the plugin and it works awesome if you change cl_ to sv_
You sould really update the plugin
__________________

Quote:
Originally Posted by KilledWithStyle
Its a fact of Half-life. Get used to it.
KilledWithStyle is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 07-18-2004 , 12:41  
Reply With Quote #30

Fixed sky box.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 08:29.


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