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

Give all players a perk.

broken avatar :(
Created 7 years ago
by greeNTheBoyz
0 Members and 1 Guest are viewing this topic.
1,427 views
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 24 November 2015
Last active: 5 years ago
Posts
10
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
greeNTheBoyz's Groups
greeNTheBoyz's Contact & Social LinksgreentheboyzytgreeNTheBoyzgreeNTheBoyzgreeNTheBoyzYT
Hey!
I've used this line of code for my shootable EE so that it gives everyone Electric Cherry:
Code Snippet
Plaintext
players[i] zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false );
but it gives me an error in the launcher.
Is there a different 'players' at the start or what?
Thanks.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Your gonna have to show more of your code. players is a local variable for that function. And PERK_ELECTRIC_CHERRY comes from the perks gsh I think. Two possible different errors.

For players you use:
Code Snippet
Plaintext
players = GetPlayers();
foreach(player in players){
player zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false );
}

You can also use a for loop with an iterative.
Code Snippet
Plaintext
players = GetPlayers();
for( i=0;i<players.size;i++ ){
players[i] zm_perks::give_perk( PERK_ELECTRIC_CHERRY, false );
}
Last Edit: November 01, 2016, 06:40:23 pm by MakeCents

 
Loading ...