Gentlemen,
Just a suggestion/solution!
One workaround the "problem"...
Quote:
NOTICE: The WEATHER can only be changed on mapchange, because its done before map loads! So change the map after changing the cvars or use weather_type 3 for randomness!!!
|
... is using "get_mapname" to get the proper configuration to map you want. The disadvantage of this: compile the plugin to configure it!
Quote:
new weather_storm;
public plugin_precache()
{
register_plugin("RainySnowy", "2.0y", "OneEyed & teame06");
register_cvar("rainysnowy", "2.0y", FCVAR_SERVER);
g_maxplayers = get_maxplayers();
new type = get_cvar_num("weather_type");
if(type == 3)
type = random_num(0,2);
new map[33];
get_mapname(map,32);
if(equali(map, "as_snowy2"))
{
type = 2;
weather_storm = 50;
}
else
{
type = 0;
weather_storm = 0;
}
switch(type){
case 1:
{
g_fxbeam = precache_model("sprites/laserbeam.spr");
precache_model("models/chick.mdl");
precache_sound("ambience/rain.wav");
precache_sound("ambience/thunder_clap.wav");
weather_ent = CREATE_ENTITY("env_rain")
THINK("env_rain","WeatherSystem")
NEXTTHINK(weather_ent,1.0)
}
case 2:
{
weather_ent = CREATE_ENTITY("env_snow");
}
}
}
|
[]'s