Sorry if it already exists, but I couldn't find it. Just a buncha old scripts that wouldn't work., so I made my own with help from the discord
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\zombies\_zm_powerups;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
level endon("game_ended");
for(;;)
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;;)
{
self waittill("spawned_player");
if(!isDefined(level.maC1))
{
wait 5;
level.maC1 = "DONE";
replaceFunc(maps\mp\zombies\_zm_powerups::full_ammo_powerup,::new_full_ammo_powerup);
}
}
}
new_full_ammo_powerup( drop_item, player )
{
players = get_players( player.team );
if ( isdefined( level._get_game_module_players ) ){
players = [[ level._get_game_module_players ]]( player );
}
for ( i = 0; i < players.size; i++ )
{
if ( players[i] maps\mp\zombies\_zm_laststand::player_is_in_laststand() )
continue;
primary_weapons = players[i] getweaponslist( 1 );
players[i] notify( "zmb_max_ammo" );
players[i] notify( "zmb_lost_knife" );
players[i] notify( "zmb_disable_claymore_prompt" );
players[i] notify( "zmb_disable_spikemore_prompt" );
for ( x = 0; x < primary_weapons.size; x++ )
{
curWeapon = primary_weapons[x];
if ( level.headshots_only && is_lethal_grenade(curWeapon) ){
continue;
}
if ( isDefined( level.zombie_include_equipment ) && isDefined( level.zombie_include_equipment[curWeapon] ) ){
continue;
}
if ( isDefined( level.zombie_weapons_no_max_ammo ) && isDefined( level.zombie_weapons_no_max_ammo[curWeapon] ) ){
continue;
}
if ( players[i] hasweapon( curWeapon ) ){
players[i] givemaxammo( curWeapon );
players[i] setweaponammoclip( curWeapon, 300);
}
}
}
level thread full_ammo_on_hud( drop_item, player.team );
}
Please report any bugs or errors.
For the record, there is one I know of already, if you have a dual wield (eg. dual wield five sevens) and you have another weapon out when you get the max ammo, the dual wield weapon will only have one clip refilled.
One of them won't
If you're holding the dual wield, it refills as expected.
If anyone knows how to fix, be my guest