1 #using scripts\codescripts\struct;
3 #using scripts\shared\clientfield_shared;
4 #using scripts\shared\hud_util_shared;
5 #using scripts\shared\laststand_shared;
6 #using scripts\shared\system_shared;
7 #using scripts\shared\util_shared;
9 #insert scripts\shared\shared.gsh;
10 #insert scripts\shared\version.gsh;
12 #using scripts\shared\ai\zombie_death;
14 #using scripts\zm\_zm_pers_upgrades_functions;
15 #using scripts\zm\_zm_placeable_mine;
16 #using scripts\zm\_zm_powerups;
17 #using scripts\zm\_zm_score;
18 #using scripts\zm\_zm_spawner;
19 #using scripts\zm\_zm_utility;
21 #insert scripts\zm\_zm_powerups.gsh;
22 #insert scripts\zm\_zm_utility.gsh;
24 #precache( "string", "ZOMBIE_POWERUP_MAX_AMMO" );
25 #precache( "eventstring", "zombie_notification" );
27 #namespace zm_powerup_full_ammo;
38 if( ToLower( GetDvarString(
"g_gametype" ) ) !=
"zcleansed" )
52 players = GetPlayers( player.team );
54 if(isDefined(level._get_game_module_players))
56 players = [[level._get_game_module_players]](player);
59 level notify(
"zmb_max_ammo_level" );
61 for (i = 0; i < players.size; i++)
69 if(isDefined(level.check_player_is_ready_for_ammo))
71 if( [[level.check_player_is_ready_for_ammo]](players[i]) ==
false )
77 primary_weapons = players[i] GetWeaponsList(
true );
79 players[i] notify(
"zmb_max_ammo" );
80 players[i] notify(
"zmb_lost_knife" );
82 for( x = 0; x < primary_weapons.size; x++ )
91 if ( IsDefined( level.zombie_include_equipment ) &&
92 IsDefined( level.zombie_include_equipment[ primary_weapons[ x ] ] ) &&
93 !
IS_TRUE( level.zombie_equipment[ primary_weapons[ x ] ].refill_max_ammo ) )
99 if ( IsDefined( level.zombie_weapons_no_max_ammo ) && IsDefined( level.zombie_weapons_no_max_ammo[ primary_weapons[ x ].name ] ) )
110 if ( players[i] HasWeapon( primary_weapons[x] ) )
111 players[i] GiveMaxAmmo( primary_weapons[x] );
120 players = GetPlayers( player_team );
122 players[0] playsoundToTeam (
"zmb_full_ammo", player_team);
124 if (isdefined(drop_item))
126 LUINotifyEvent( &
"zombie_notification", 1, drop_item.hint );