Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #using scripts\codescripts\struct;
- #using scripts\shared\audio_shared;
- #using scripts\shared\callbacks_shared;
- #using scripts\shared\clientfield_shared;
- #using scripts\shared\exploder_shared;
- #using scripts\shared\scene_shared;
- #using scripts\shared\util_shared;
- #insert scripts\shared\shared.gsh;
- #insert scripts\shared\version.gsh;
- #using scripts\zm\_load;
- #using scripts\zm\_zm_weapons;
- //Perks
- #using scripts\zm\_zm_pack_a_punch;
- #using scripts\zm\_zm_perk_additionalprimaryweapon;
- #using scripts\zm\_zm_perk_doubletap2;
- #using scripts\zm\_zm_perk_deadshot;
- #using scripts\zm\_zm_perk_juggernaut;
- #using scripts\zm\_zm_perk_quick_revive;
- #using scripts\zm\_zm_perk_sleight_of_hand;
- #using scripts\zm\_zm_perk_staminup;
- #using scripts\zm\_zm_perk_widows_wine;
- //Powerups
- #using scripts\zm\_zm_powerup_double_points;
- #using scripts\zm\_zm_powerup_carpenter;
- #using scripts\zm\_zm_powerup_fire_sale;
- #using scripts\zm\_zm_powerup_free_perk;
- #using scripts\zm\_zm_powerup_full_ammo;
- #using scripts\zm\_zm_powerup_insta_kill;
- #using scripts\zm\_zm_powerup_nuke;
- //Traps
- #using scripts\zm\_zm_trap_electric;
- #using scripts\zm\zm_usermap;
- #define SNOW_FX "dlc0/factory/fx_snow_player_os_factory"
- #precache( "client_fx", SNOW_FX );
- function main()
- {
- callback::on_localplayer_spawned( &on_localplayer_spawned );
- level.weather_intensity = 0.3;
- clientfield::register( "world", "weather_intensity", VERSION_SHIP, 2, "int", &weather_intensity, !CF_HOST_ONLY, !CF_CALLBACK_ZERO_ON_NEW_ENT );
- zm_usermap::main();
- include_weapons();
- util::waitforclient( 0 );
- }
- function on_localplayer_spawned( localClientNum )
- {
- if( self == GetLocalPlayer( localClientNum ) )
- self thread falling_snow(localClientNum);
- }
- function falling_snow(localClientNum)
- {
- self endon( "disconnect" );
- self endon( "entityshutdown" );
- self endon( "death" );
- while(1)
- {
- if(level.weather_intensity == 0)
- {
- wait .1;
- continue;
- }
- PlayFX( localClientNum, SNOW_FX, self.origin );
- wait level.weather_intensity;
- }
- }
- function weather_intensity( localClientNum, oldVal, newVal, bNewEnt, bInitialSnap, fieldName, bWasTimeJump )
- {
- // If value = 0 that will stop the weather
- // Lower the numbers to increase intensity ( Cannot go below 0 )
- switch(newVal)
- {
- case 0:
- level.weather_intensity = 0;
- break;
- case 1:
- level.weather_intensity = 0.1;
- break;
- case 2:
- level.weather_intensity = 0.15;
- break;
- case 3:
- level.weather_intensity = 0.05;
- break;
- }
- }
- function include_weapons()
- {
- zm_weapons::load_weapon_spec_from_table("gamedata/weapons/zm/zm_levelcommon_weapons.csv", 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement