UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Perk powerup script

broken avatar :(
Created 7 years ago
by Pieternba2k
0 Members and 1 Guest are viewing this topic.
1,516 views
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 7 March 2016
Last active: 6 years ago
Posts
88
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Love 4 Custom zombies
Signature
My maps:
Pietercity v1.0
Matrix V1.1
×
Pieternba2k's Groups
Pieternba2k's Contact & Social Linksbasketlbalpro-96PieternbaPieternba2kLove4theGame
Hello everyone I used this tutorial for my map:
https://ugx-mods.com/forum/index.php?topic=5796.0
and it works great, however I want to make it so when a person grabs the powerup everybody gets the perk instead of only the person who grabs it.
Does anybody know what I need to add to the script, it should be a simple tweak.

I believe this should be the part that needs to be modified:
getRandomPerk(player)
{
   //DUKIP - Make sure we're not drinking anything already.
   if(IsSubStr(player getCurrentWeapon(), "bottle") || (IsDefined(player.is_drinking) && player.is_drinking))
      return;

   all_perks = [];
   all_perks[0] = "specialty_armorvest";
   all_perks[1] = "specialty_quickrevive";
   all_perks[2] = "specialty_fastreload";
   all_perks[3] = "specialty_rof";
   //all_perks[NUM] = "specialty_XXXX";

   all_perks = array_randomize(all_perks);

   thePerk = random(all_perks);

   return thePerk;
}

Thanks a lot for your help!
Last Edit: July 10, 2017, 08:26:27 am by Pieternba2k
Marked as best answer by Pieternba2k 7 years ago
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
I cant test till later but in the powerup_grab() function you should be able to change
players thread zombie_perk_powerup();
//To
allplayers=get_players();
array_thread(allplayers,::zombie_perk_powerup);
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 7 March 2016
Last active: 6 years ago
Posts
88
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Love 4 Custom zombies
×
Pieternba2k's Groups
Pieternba2k's Contact & Social Linksbasketlbalpro-96PieternbaPieternba2kLove4theGame
I cant test till later but in the powerup_grab() function you should be able to change
players thread zombie_perk_powerup();
//To
allplayers=get_players();
array_thread(allplayers,::zombie_perk_powerup);

thankyou

 
Loading ...