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

API Scripting Help Fog, Rain for each map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GAARA54
Veteran Member
Join Date: Oct 2009
Location: Everywhere
Old 12-03-2011 , 12:06   Fog, Rain for each map
Reply With Quote #1

It is possible to edit script in zp4.3
to make each map have each config for RAIN and FOG ?

Like this

PHP Code:
[Weather Effects]
RAIN de_dust2 0
RAIN de_dust 
1
SNOW 
0
FOG de_dust2 
1
FOG de_dust 
0
FOG DENSITY 
0.0018
FOG COLOR 
128 128 128 
__________________

Last edited by GAARA54; 12-03-2011 at 15:02.
GAARA54 is offline
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 12-03-2011 , 13:26   Re: Fog, Rain for each map
Reply With Quote #2

Use something like this:
http://forums.alliedmods.net/showpos...9&postcount=12

For change this:
PHP Code:
new const ZP_SETTINGS_FILE[] = "zombieplague.ini" 
It would be nice if add this (all settings) for the next version.

Last edited by XINLEI; 12-03-2011 at 13:28.
XINLEI is offline
GAARA54
Veteran Member
Join Date: Oct 2009
Location: Everywhere
Old 12-03-2011 , 13:38   Re: Fog, Rain for each map
Reply With Quote #3

it is possible to done it with something like this ?

PHP Code:
            case SECTION_WEATHER_EFFECTS:
            {
                static 
mapname[32]
                
get_mapname(mapname31)
                if (
equal(keymapname"RAIN"))
                    
g_ambience_rain str_to_num(value)
                else if (
equal(key"SNOW"))
                    
g_ambience_snow str_to_num(value)
                else if (
equal(key"FOG"))
                    
g_ambience_fog str_to_num(value)
                else if (
equal(key"FOG DENSITY"))
                    
copy(g_fog_densitycharsmax(g_fog_density), value)
                else if (
equal(key"FOG COLOR"))
                    
copy(g_fog_colorcharsmax(g_fog_color), value)
            } 
i get error on this line

PHP Code:
                if (equal(keymapname"RAIN")) 
i full noob in scripting, but i done this with skyboxes... by using code from other plugin and interpret in zp code...

PHP Code:
[Custom Skies] (randomly chosen if more than one)
de_dust2 zmz1_
zm_tower4_rmk zmz1_
zm_snowpatrol_kzm_1 zmz_winter_
zm_no_parking_v1.3 nynight_
zm_dust_winter zmz_winter_ 
p.s.

try this

PHP Code:
            case SECTION_WEATHER_EFFECTS:
            {
                static 
mapname[32]
                
get_mapname(mapname31)
                if (
equal(key"RAIN %s"), mapname)
                    
g_ambience_rain str_to_num(value)
                else if (
equal(key"SNOW"))
                    
g_ambience_snow str_to_num(value)
                else if (
equal(key"FOG %s"), mapname)
                    
g_ambience_fog str_to_num(value)
                else if (
equal(key"FOG DENSITY"))
                    
copy(g_fog_densitycharsmax(g_fog_density), value)
                else if (
equal(key"FOG COLOR"))
                    
copy(g_fog_colorcharsmax(g_fog_color), value)
            } 
but get errors on this lines...
PHP Code:
                if (equal(key"RAIN %s"), mapname)
                else if (
equal(key"FOG %s"), mapname
__________________

Last edited by GAARA54; 12-03-2011 at 14:32.
GAARA54 is offline
Killer zm
Senior Member
Join Date: Jun 2011
Old 12-06-2011 , 03:20   Re: Fog, Rain for each map
Reply With Quote #4

You can do this in another way:

1.Disable Fog in zp.ini >> FOG = 0
2.Instal another plugin with fog like this> https://forums.alliedmods.net/showthread.php?t=132032
3.Go to cstrike/addon/amxmodx/configs/ there make e new folder with the name maps so will be cstrike/addons/amxmodx/configs/maps.
4In maps folder make for each map a cfg. ex. zm_dust_winter.cfg ,zm_no_parking_v1.3.cfg and fr each map.
5.For example we take zm_dust_winter.cfg were we put this:

zp_adv_fog_density 2
zp_adv_fog_color_R 100
zp_adv_fog_color_G 45
zp_adv_fog_color_B 0

Then zm_no_parking_v1.3.cfg we can put a different setings


zp_adv_fog_density 3
zp_adv_fog_color_R 100
zp_adv_fog_color_G 0
zp_adv_fog_color_B 0


6. For make this work you must to go to your server.cfg and put this line

mapchangecfgfile server.cfg


And for rain or snow you can search anothers plugins with snow or rain and put in each map.cfg different seting.

I find to do this here: http://wiki.amxmodx.org/Configuring_...p_Config_Files

Last edited by Killer zm; 12-06-2011 at 03:23.
Killer zm is offline
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 12-06-2011 , 14:02   Re: Fog, Rain for each map
Reply With Quote #5

Quote:
Originally Posted by GAARA54 View Post
it is possible to done it with something like this ?
it's possible but it will be hardcoded (something hard to change) and it will have a lot of conditions (checking map1, if it's not check map2 if it's not check map3...) or a large Switch which it's almost the same.
XINLEI is offline
GAARA54
Veteran Member
Join Date: Oct 2009
Location: Everywhere
Old 12-09-2011 , 18:02   Re: Fog, Rain for each map
Reply With Quote #6

hmmm... i'm have idea
it is possible to make lice cvar, it very easy to edit zp for it
"zp_fog" "1"
"zp_rain" "1"
etc
after it we don't need zombieplague.ini, we need zombieplague.cfg
then create folder configs/maps/

and creating here files: mapname.cfg
and put for each map/config cvar blabla 0, cvar blabla2 1, etc...
__________________

Last edited by GAARA54; 12-09-2011 at 18:03.
GAARA54 is offline
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 12-09-2011 , 18:12   Re: Fog, Rain for each map
Reply With Quote #7

Quote:
Originally Posted by GAARA54 View Post
hmmm... i'm have idea
it is possible to make lice cvar, it very easy to edit zp for it
"zp_fog" "1"
"zp_rain" "1"
etc
after it we don't need zombieplague.ini, we need zombieplague.cfg
then create folder configs/maps/

and creating here files: mapname.cfg
and put for each map/config cvar blabla 0, cvar blabla2 1, etc...
Well, that could work too, but we need to mercylezz for this and tell us what he thinks about.
XINLEI is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 12-09-2011 , 20:11   Re: Fog, Rain for each map
Reply With Quote #8

Quote:
Originally Posted by XINLEI View Post
Well, that could work too, but we need to mercylezz for this and tell us what he thinks about.
I guess he doesn't support 4.3 any more. So even if the suggestion works well, it will only be implemented on 5.0 instead.
Excalibur.007 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 20:33.


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