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

How to give players points?

broken avatar :(
Created 11 years ago
by Wolfilms
0 Members and 1 Guest are viewing this topic.
2,434 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 28 June 2015
Last active: 7 years ago
Posts
72
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
Wolfilms's Groups
Wolfilms's Contact & Social Links
how do you give players 500 points after every round?
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Add this inside round_think() function in _zombiemode.gsc:
Code Snippet
Plaintext
players = get_players();
for( i = 0; i < players.size; i++ )
    players[i] maps\_zombiemode_score::add_to_player_score(500);
Just after this line:
Code Snippet
Plaintext
round_wait();
For example.
Marked as best answer by Wolfilms 11 years ago
broken avatar :(
×
broken avatar :(
Location: usNUKETOWN
Date Registered: 19 February 2014
Last active: 9 years ago
Posts
177
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Zombie Specialist
Signature
×
thezombieproject's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
i made something similar for a friend a few months ago when i first started scripting.
Maybe you'll have more use for it then me.
 ingame - https://gyazo.com/4123e9ce7b5233d13d13c31838e8294b

in mods/maps/yourmapname.gsc  - under , maps\_zombiemode::main(); add this line...
Code Snippet
Plaintext
thread tzp_survivors_bonus_points();

in mods/maps/yourmapname.gsc add this all the way at the bottom
Code Snippet
Plaintext
tzp_survivors_bonus_points()
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//  EDIT SHiT HERE!! 
Points = 500; // amount of points to give players at the end of a round.
PointsX2 = 1000; // if players have double points give this amount.
PointsOnRound = 3; // Start giving points after this round.  or *Set to 1 to give every round.*
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
while(1)
{
level waittill ( "between_round_over" );
if( level.round_number <= PointsOnRound ) continue;
players = get_players();
for( i = 0; i < players.size; i++ )
{
if( is_player_valid( players[i] ) ) // make sure players valid.
{
if ( level.zombie_vars["zombie_powerup_point_doubler_on"] ) // if double points.
{
iprintlnbold("Survivor Bonus^2 +" +PointsX2+ " Points! " );
playsoundatposition("cha_ching", players[i].origin);
players[i] maps\_zombiemode_score::add_to_player_score(PointsX2);
}else{
iprintlnbold("Survivor Bonus^2 +" +Points+ " Points! " );
playsoundatposition("cha_ching", players[i].origin);
players[i] maps\_zombiemode_score::add_to_player_score(Points);
}
}
}
}
}


**save and build mod
Last Edit: November 04, 2015, 08:01:55 pm by thezombieproject

 
Loading ...