#include maps\_utility; #include common_scripts\utility;#include maps\_zombiemode_utility;main(){ ammo_trig = getentarray( "ammo_trigger", "targetname" ); array_thread(ammo_trig,::ammo_refill);}ammo_refill(){ cost = 500; self setcursorhint("HINT_NOICON"); self sethintstring("Press and Hold &&1 to refill your current weapon. Cost ["+ cost +"] "); while(1) { player = undefined; self waittill( "trigger", player ); weapon = player getcurrentweapon(); ammo_count = player GetFractionMaxAmmo( weapon ); if( player.score >= cost && ammo_count != 1 && !player maps\_laststand::player_is_in_laststand() && !isdefined( player.being_revived) || player.score >= cost && ammo_count != 1 && !player maps\_laststand::player_is_in_laststand() && isdefined( player.being_revived) && !player.being_revived) { player maps\_zombiemode_score::minus_to_player_score( cost ); player playsound( "cha_ching" ); player givemaxammo( weapon ); } else { player playsound( "deny" ); } }}
maps\_zombiemode::main();
maps\ammo_buy_triggers::main(); // IF YOU USED ANOTHER NAME FOR THE .GSC CHANGE IT HERE TOO!!