

Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!

paypal.me/F3ARxReaper666![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
aw_credit_dispense#include maps\_utility;
#include common_scripts\utility;
#include maps\_zombiemode_utility;
init()
{
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//tweekables - the following lines can be edited to your needs!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//chances! these should be between 0-100 (zero means no chance)
level.is_active_chance = 75; //percent chance that it will be on at the start
level.jackpot_chance = 5; //percent chance of jackpot (LOTS of point, default between 600-1200) make 0 to disable
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//points!
level.normal_points = 100; //amount of points it will normally give
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//jackpot!
level.jackpot_lowest_points = 60; //lowest amount jackpot can give (note: it will multiply by 10)
level.jackpot_highest_points = 120; //highest amount jackpot can give (note: it will multiply by 10)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//down time /aka/ temporary disabled
level.down_time_min = 60; //min amount of seconds to wait til back online
level.down_time_max = 300; //max amount of seconds to wait til back online
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//end of tweekables, feel free to modify and scripts below if you know what your doing!
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
credit_dispense = GetEntArray( "credit_dispense", "targetname" );
for( i = 0; i < credit_dispense.size; i++ )
{
credit_dispense[i] thread check_if_on();
}
}
check_if_on()
{
self SetHintString( "" );
self SetCursorHint( "HINT_NOICON" );
self UseTriggerRequireLookAt();
if(randomint(100) < level.is_active_chance)
self.on =true;
else
self.on = false;
wait .1;
if (self.on == true)
self thread trigger_active();
else
self thread trigger_down_time();
}
trigger_down_time()
{
self.on = false;
self SetHintString( "" );
self.time_to_wait = randomintrange(level.down_time_min ,level.down_time_max);
wait self.time_to_wait;
self.on =true;
self thread trigger_active();
}
trigger_active()
{
self SetHintString( "HOLD &&1 FOR ^3CREDITS" );
self waittill( "trigger", player );
player thread point_gain( player );
self thread trigger_down_time();
}
point_gain( user )
{
if(randomint(100) < level.jackpot_chance)
{
user.point_total = randomintrange(level.down_time_min,level.down_time_max);
wait 2;
user iPrintLnBold("^7OVERIDE ENABLED");
wait 2;
while(user.point_total > 0)
{
user thread maps\_zombiemode_score::add_to_player_score( 10 * level.zombie_vars["zombie_point_scalar"] );
user.point_total-=1;
wait 0.1;
if (user.point_total < 1)
break;
}
}
else
{
points = level.normal_points * level.zombie_vars["zombie_point_scalar"];
user playlocalsound("cha_ching");
user iPrintLnBold("^7+" + points + " CREDITS");
user thread maps\_zombiemode_score::add_to_player_score( points );
}
} maps\_zombiemode_auto_turret::init();
maps\aw_credit_dispense::init();
targetnamecredit_dispense