Post: Increase stats [Problem]
09-14-2012, 06:15 PM #1
GetTangoed
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); Hey Ngu i have just included a few Increase stat functions into my patch
    Kills()
{
self IncreaseStat("kills",50000);
self iPrintln("50,000 Kills added");
}

Deaths()
{
self IncreaseStat("deaths",20000);
self iPrintln("20,000 Deaths added");
}

Assists()
{
self IncreaseStat("assists",10000);
self iPrintln("10,000 Assists added");
}

Wins()
{
self IncreaseStat("wins",5000);
self iPrintln("5000 Wins added");
}

Loss()
{
self IncreaseStat("losses",2000);
self iPrintln("2000 Losses added");
}

Ties()
{
self IncreaseStat("ties",1000);
self iPrintln("1000 Ties added");
}

Hshots()
{
self IncreaseStat("headshots",10000);
self iPrintln("10,000 Headshots added");
}

TPlayed()
{
self incStaticPlayerStat("timePlayedOther",172800);
self incStaticPlayerStat("timePlayedTotal",172800);
self iPrintln("2 days added");
}

Kstreak()
{
self IncreaseStat("killStreak",15);
self iPrintln("Increased KS by 15");
}

Wstreak()
{
self IncreaseStat("winStreak",15);
self iPrintln("Increased WS by 15");
}

Hits()
{
totalShots=self maps\mp\gametypes\_persistence::statGetBuffered("totalShots")+50000;
self setStaticPlayerStat("totalShots",totalShots);
hits=self maps\mp\gametypes\_persistence::statGetBuffered("hits")+50000;
self setStaticPlayerStat("hits",hits);
if(totalShots>hits)
{
self setStaticPlayerStat("misses",int(totalShots-hits));
}
self updatePersRatio("accuracy","hits","totalShots");
self updatePersRatioBuffered("accuracy","hits","totalShots");
self iPrintln("50,000 Hits added");
}

Misses()
{
totalShots=self maps\mp\gametypes\_persistence::statGetBuffered("totalShots")+10000;
self setStaticPlayerStat("totalShots",totalShots);
hits=self maps\mp\gametypes\_persistence::statGetBuffered("hits");
if(totalShots>hits)
{
self setStaticPlayerStat("misses",int(totalShots-hits));
}
self updatePersRatio("accuracy","totalShots","hits");
self updatePersRatioBuffered("accuracy","totalShots","hits");
self iPrintln("10,000 Misses added");
}

But when i try to run it i get unknown function i know it is these as i took them and it worked fine so could someone help me on to where i am going wrong thanks Smile
(adsbygoogle = window.adsbygoogle || []).push({});
09-14-2012, 08:37 PM #2
zoCHARLEYoz
I am error
Kills()
{
self setPlayerData( "kills", 50000 );
self iPrintln("50,000 Kills added");
}

Deaths()
{
self setPlayerData( "deaths", 20000 );
self iPrintln("20,000 Deaths added");
}

Assists()
{
self setPlayerData( "assists", 10000 );
self iPrintln("10,000 Assists added");
}

Wins()
{
self setPlayerData( "wins", 5000 );
self iPrintln("5000 Wins added");
}

Loss()
{
self setPlayerData( "losses", 2000 );
self iPrintln("2000 Losses added");
}
09-15-2012, 02:29 AM #3
Ghost1990
12-28-2012
Originally posted by GetTangoed View Post
Hey Ngu i have just included a few Increase stat functions into my patch
    Kills()
{
self IncreaseStat("kills",50000);
self iPrintln("50,000 Kills added");
}

Deaths()
{
self IncreaseStat("deaths",20000);
self iPrintln("20,000 Deaths added");
}

Assists()
{
self IncreaseStat("assists",10000);
self iPrintln("10,000 Assists added");
}

Wins()
{
self IncreaseStat("wins",5000);
self iPrintln("5000 Wins added");
}

Loss()
{
self IncreaseStat("losses",2000);
self iPrintln("2000 Losses added");
}

Ties()
{
self IncreaseStat("ties",1000);
self iPrintln("1000 Ties added");
}

Hshots()
{
self IncreaseStat("headshots",10000);
self iPrintln("10,000 Headshots added");
}

TPlayed()
{
self incStaticPlayerStat("timePlayedOther",172800);
self incStaticPlayerStat("timePlayedTotal",172800);
self iPrintln("2 days added");
}

Kstreak()
{
self IncreaseStat("killStreak",15);
self iPrintln("Increased KS by 15");
}

Wstreak()
{
self IncreaseStat("winStreak",15);
self iPrintln("Increased WS by 15");
}

Hits()
{
totalShots=self maps\mp\gametypes\_persistence::statGetBuffered("totalShots")+50000;
self setStaticPlayerStat("totalShots",totalShots);
hits=self maps\mp\gametypes\_persistence::statGetBuffered("hits")+50000;
self setStaticPlayerStat("hits",hits);
if(totalShots>hits)
{
self setStaticPlayerStat("misses",int(totalShots-hits));
}
self updatePersRatio("accuracy","hits","totalShots");
self updatePersRatioBuffered("accuracy","hits","totalShots");
self iPrintln("50,000 Hits added");
}

Misses()
{
totalShots=self maps\mp\gametypes\_persistence::statGetBuffered("totalShots")+10000;
self setStaticPlayerStat("totalShots",totalShots);
hits=self maps\mp\gametypes\_persistence::statGetBuffered("hits");
if(totalShots>hits)
{
self setStaticPlayerStat("misses",int(totalShots-hits));
}
self updatePersRatio("accuracy","totalShots","hits");
self updatePersRatioBuffered("accuracy","totalShots","hits");
self iPrintln("10,000 Misses added");
}

But when i try to run it i get unknown function i know it is these as i took them and it worked fine so could someone help me on to where i am going wrong thanks Smile

Where's your IncreaseStat() function? That would cause your unknown function error.
Originally posted by zoCHARLEYoz View Post
Kills()
{
self setPlayerData( "kills", 50000 );
self iPrintln("50,000 Kills added");
}

Deaths()
{
self setPlayerData( "deaths", 20000 );
self iPrintln("20,000 Deaths added");
}

Assists()
{
self setPlayerData( "assists", 10000 );
self iPrintln("10,000 Assists added");
}

Wins()
{
self setPlayerData( "wins", 5000 );
self iPrintln("5000 Wins added");
}

Loss()
{
self setPlayerData( "losses", 2000 );
self iPrintln("2000 Losses added");
}


That'll just set the stat to whatever you have for the value, not increase it like he's wanting to do.
09-15-2012, 09:35 AM #4
GetTangoed
Do a barrel roll!
Originally posted by Ghost1990 View Post
Where's your IncreaseStat() function? That would cause your unknown function error.

It's in my GetTangoed.gsc but don't worry I have this code
    
kills
{
C=self setPlayerData("kills");
A2=c+10000;
Self setPlayerData("kills",a2);
Self iPrintln("10,000 kills added");
}

But could you tell me what the timeplayed one is because I need that thanks Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo