Posts
941
Respect
136Add +1
Forum Rank
The Decider
Primary Group
Member
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!wallet_checker() {
do_check = true;
if(do_check) {
players = get_players();
for(i = 0; i < players.size; i++)
players = get_players();
for(i=0;i<players.size;i++)
{
players[0] wallet_check();
players[1] wallet_check();
players[2] wallet_check();
players[3] wallet_check();
}
}
}
wallet_check() {
while(1)
{
players = get_players();
players = get_players();
for(i = 0; i < players.size; i++)
if(players[i].score >= 1000) //change 1000 to the amount you want it to stop
{
//iprintln("Checking...");
players[i].score = 1000; // make this the same number as the one above
players[i].old_score = 0;
if(isdefined(players[i].score) && isdefined(players[i].old_score) )
{
players[i] thread set_player_score_hud_new();
}
else
{
iprintln("^1Coult not find the scores");
}
if(players[i].score == 1000)
{
// iprintln("^2Fixed");
}
}
wait(1);
}
}
set_player_score_hud_new( init )
{
num = self.entity_num;
score_diff = self.score - self.old_score;
//self thread score_highlight( self.score, score_diff );
if( IsDefined( init ) )
{
return;
}
self.old_score = self.score;
} thread wallet_check();
thread wallet_checker();

wallet_checker()
{
players = get_players();
players[0] wallet_check();
players[1] wallet_check();
players[2] wallet_check();
players[3] wallet_check();
}


![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
wallet_checker()
{
/*---------
:Optimized by DuaLVII's:
Removed a lot of unnecessary junk from the script
---------*/
level.score_limiter = 5000; //Global level variable for any future changes which could include picking up wallets for larger cap size
players = get_players();
array_thread(players,::wallet_check);
}
wallet_check()
{
/*
Example:
if(isDefined(level.score_limiter))
{
level.score_limiter += 1000;
}
:Example
*/
while(1)
{
if(self.score >= level.score_limiter)
{
self.score = level.score_limiter;
self.old_score = 0;
self thread set_player_score_hud_new(); //No point in finding if it's defined since the rest of the process wouldn't of worked in the first place
}
wait(0.1);
}
}
set_player_score_hud_new( init )
{
num = self.entity_num;
score_diff = self.score - self.old_score;
if( IsDefined( init ))
{
return;
}
self.old_score = self.score;
}
thread wallet_checker();
wallet_checker()
{
/*---------
:Optimized by DuaLVII's:
Removed a lot of unnecessary junk from the script
---------*/
level.score_limiter = 5000; //Global level variable for any future changes which could include picking up wallets for larger cap size
players = get_players();
array_thread(players,::wallet_check);
array_thread(players,::wallet_hud_notify);
}
wallet_hud_notify()
{
/*
Ray's Wallet Cap exceeded HUD notification
*/
for(;;){
self waittill("zombie_wallet_cap_exceeded");
notification = NewClientHudElem(self);
notification SetText("Can't hold more points");
notification.alpha = 1;
notification FadeOverTime(5);
notification.alignY = "center";
notification.alignX = "middle";
notification.y = -75;
notification.alpha = 0;
wait(5);
notification Destroy();
wait(1);
}
}
wallet_check()
{
/*
Example:
if(isDefined(level.score_limiter))
{
level.score_limiter += 1000;
}
:Example
*/
while(1)
{
if(self.score >= level.score_limiter)
{
self.score = level.score_limiter;
self.old_score = 0;
self notify("zombie_wallet_cap_exceeded");
self thread set_player_score_hud_new(); //No point in finding if it's defined since the rest of the process wouldn't of worked in the first place
}
wait(0.1);
}
}
set_player_score_hud_new( init )
{
num = self.entity_num;
score_diff = self.score - self.old_score;
if( IsDefined( init ))
{
return;
}
self.old_score = self.score;
}

thread wallet_checker();
wow this has changed from a 2 person script to a comunity script
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
Not sure why the extra coding was put in there(besides the do_check()), but either way it works. I don't see why people need to butcher the code and call it their "Optimized" version(which i take offense to), unless to remove the few extra bits of code.
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() UGX V.I.P. | |
![]() | Has released one or more maps to the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |