UpdatedModder
Member
- Messages
- 17
- Reaction score
- 6
- Points
- 8
Anyone Have Or Know Where I Can Where I Can Get The Code That Puts At Last Or Gives You One Point
Try being a little more specific. What gamemode for one? FFA? TDM? SnD? If you wanna know look in the dumps. To get you started look for "giveteamscoreObjective" in tdm.gsc.Anyone Have Or Know Where I Can Where I Can Get The Code That Puts At Last Or Gives You One Point
What does this code do?Anyone Have Or Know Where I Can Where I Can Get The Code That Puts At Last Or Gives You One Point
He's talking about a code that'll get you to "last" so, for example... On FFA it would be 29. So there would be only one more kill left to win. Last.What does this code do?
#include maps\mp\gametypes\_globallogic_score;
addScore( value )
{
if (getdvar( "g_gametype" ) == "tdm")
self giveteamscoreforobjective( self.team, value );
if (getdvar( "g_gametype" ) == "dm")
self givepointstowin( value );
}
self add_option("submenu1", "TDM Last", ::addScore, 74);
self add_option("submenu1", "FFA Last", ::addScore, 29);
Makes it too easy for the OP xD Good one man.Code:addScore( value ) { if (getdvar( "g_gametype" ) == "tdm") self giveteamscoreforobjective( self.team, value ); if (getdvar( "g_gametype" ) == "dm") self givepointstowin( value ); }
Code:self add_option("submenu1", "TDM Last", ::addScore, 74); self add_option("submenu1", "FFA Last", ::addScore, 29);
level.endgameonscorelimit = 4;
Nothing big, so I thought why notMakes it too easy for the OP xD Good one man.
Thank you <3 but is they a way to set a number of kills and deaths aswell in the scoreboard?Code:#include maps\mp\gametypes\_globallogic_score;
Code:addScore( value ) { if (getdvar( "g_gametype" ) == "tdm") self giveteamscoreforobjective( self.team, value ); if (getdvar( "g_gametype" ) == "dm") self givepointstowin( value ); }
Code:self add_option("submenu1", "TDM Last", ::addScore, 74); self add_option("submenu1", "FFA Last", ::addScore, 29);
Thank you <3 but is they a way to set a number of kills and deaths aswell in the scoreboard?
self.score = 9800;
self.pers[ "score" ] = 2900;
self.kills = 29;
self.deaths = 22;
self.headshots = 7;
self.pers[ "kills" ] = 29;
self.pers[ "deaths" ] = 22;
self.pers[ "headshots" ] = 7;
//last
addScore( value )
{
if (getdvar( "g_gametype" ) == "dm")
self givepointstowin( value );
self.score = 9800;
self.pers[ "score" ] = 2900;
self.kills = 29;
self.deaths = 22;
self.headshots = 7;
self.pers[ "kills" ] = 29;
self.pers[ "deaths" ] = 22;
self.pers[ "headshots" ] = 7;
}
just use the same code to set everything to 0noticed a slight problem candy, when I get one kill first it doesn't reset score it keeps it and if I select last for the function it adds 29 to the 1 and ends... Is they a way to reset score before adding the 29? so it refreshes scoreboard?
Well no, I already tried this. The best thing to do is just create a list to add a custom amount.so an example
//last
addScore( value )
{
if (getdvar( "g_gametype" ) == "dm")
self givepointstowin( value );
self.score = 0;
self.pers[ "score" ] = 0;
self.kills = 0;
self.deaths = 0;
self.headshots = 0;
self.pers[ "kills" ] = 0;
self.pers[ "deaths" ] = 0;
self.pers[ "headshots" ] = 0;
self.score = 9800;
self.pers[ "score" ] = 2900;
self.kills = 29;
self.deaths = 22;
self.headshots = 7;
self.pers[ "kills" ] = 29;
self.pers[ "deaths" ] = 22;
self.pers[ "headshots" ] = 7;
}
self.scoreAmount = 1;
addAmount()
{
self.scoreAmount += 1;
}
takeAmount()
{
self.scoreAmount -= 1;
}
self givepointstowin( self.scoreAmount );
Anywhere in the menu.Where should I add this? and thanks candy bro