Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check my code?
#31
(07-12-2011, 01:09)GOVNO12 Wrote:
(07-12-2011, 00:54)GoldenWrapper Wrote:
(07-12-2011, 00:46)GOVNO12 Wrote:
(07-12-2011, 00:22)GoldenWrapper Wrote:
(07-12-2011, 00:19)GOVNO12 Wrote: WHAT ELSE IS IN YOUR RANK? ONLY OnPlayerSpawned()?
IS IT BLANK? or what

It was originally before I got the link
If it can't find it? Does it mean there are missing files in the black ops folder? I can run other mods fine though.

Ok now my code should work haha Big Grin

Wait what?
(07-12-2011, 00:46)GOVNO12 Wrote:
(07-12-2011, 00:22)GoldenWrapper Wrote:
(07-12-2011, 00:19)GOVNO12 Wrote: WHAT ELSE IS IN YOUR RANK? ONLY OnPlayerSpawned()?
IS IT BLANK? or what

It was originally before I got the link
If it can't find it? Does it mean there are missing files in the black ops folder? I can run other mods fine though.

Ok now my code should work haha Big Grin

Wait what?
Now put my code in onPlayerSpawed()

It gives me:
Server script compile error
Could not find script 'common_scriptsutility'
[Image: mca.png]
Add me on steam! otterm
Reply

#32
did you make correct path (mods -> your mod -> maps -> mp -> gametypes -> _rank.gsc) ? if yes, post your rank here
[Image: lQDUjba.jpg]
Reply

#33
(07-12-2011, 10:51)OrangePL Wrote: did you make correct path (mods -> your mod -> maps -> mp -> gametypes -> _rank.gsc) ? if yes, post your rank here

Yes, it is stored in:
C:\Program Files (x86)\Steam\steamapps\common\call of duty black ops\mods\mp_My_Own_Mod\maps\mp\gametypes

Here is my full code:
PHP Code:
#include common_scriptsutility; 
#include mapsmp_utility; 
#include mapsmpgametypes_hud_util; 
init() 

    
level.scoreInfo = []; 
    
level.xpScale GetDvarInt#"scr_xpscale" ); 
    
level.codPointsXpScale GetDvarFloat#"scr_codpointsxpscale" ); 
    
level.codPointsMatchScale GetDvarFloat#"scr_codpointsmatchscale" ); 
    
level.codPointsChallengeScale GetDvarFloat#"scr_codpointsperchallenge" ); 
    
level.rankXpCap GetDvarInt#"scr_rankXpCap" ); 
    
level.codPointsCap GetDvarInt#"scr_codPointsCap" );     
    
level.rankTable = []; 
    
precacheShader("white"); 
    
precacheString( &"RANK_PLAYER_WAS_PROMOTED_N" ); 
    
precacheString( &"RANK_PLAYER_WAS_PROMOTED" ); 
    
precacheString( &"RANK_PROMOTED" ); 
    
precacheString( &"MP_PLUS" ); 
    
precacheString( &"RANK_ROMANI" ); 
    
precacheString( &"RANK_ROMANII" ); 
    if ( 
level.teamBased 
    { 
        
registerScoreInfo"kill"100 ); 
        
registerScoreInfo"headshot"100 ); 
        
registerScoreInfo"assist_75"80 ); 
        
registerScoreInfo"assist_50"60 ); 
        
registerScoreInfo"assist_25"40 ); 
        
registerScoreInfo"assist"20 ); 
        
registerScoreInfo"suicide"); 
        
registerScoreInfo"teamkill"); 
        
registerScoreInfo"dogkill"30 ); 
        
registerScoreInfo"dogassist"10 ); 
        
registerScoreInfo"helicopterkill"200 ); 
        
registerScoreInfo"helicopterassist"50 ); 
        
registerScoreInfo"helicopterassist_75"150 ); 
        
registerScoreInfo"helicopterassist_50"100 ); 
        
registerScoreInfo"helicopterassist_25"50 ); 
        
registerScoreInfo"spyplanekill"100 ); 
        
registerScoreInfo"spyplaneassist"50 ); 
        
registerScoreInfo"rcbombdestroy"50 ); 
    } 
    else 
    { 
        
registerScoreInfo"kill"50 ); 
        
registerScoreInfo"headshot"50 ); 
        
registerScoreInfo"assist_75"); 
        
registerScoreInfo"assist_50"); 
        
registerScoreInfo"assist_25"); 
        
registerScoreInfo"assist"); 
        
registerScoreInfo"suicide"); 
        
registerScoreInfo"teamkill"); 
        
registerScoreInfo"dogkill"20 ); 
        
registerScoreInfo"dogassist"); 
        
registerScoreInfo"helicopterkill"100 ); 
        
registerScoreInfo"helicopterassist"); 
        
registerScoreInfo"helicopterassist_75"); 
        
registerScoreInfo"helicopterassist_50"); 
        
registerScoreInfo"helicopterassist_25"); 
        
registerScoreInfo"spyplanekill"25 ); 
        
registerScoreInfo"spyplaneassist"); 
        
registerScoreInfo"rcbombdestroy"30 ); 
    } 
     
    
registerScoreInfo"win"); 
    
registerScoreInfo"loss"0.5 ); 
    
registerScoreInfo"tie"0.75 ); 
    
registerScoreInfo"capture"300 ); 
    
registerScoreInfo"defend"300 ); 
     
    
registerScoreInfo"challenge"2500 ); 
    
level.maxRank int(tableLookup"mp/rankTable.csv"0"maxrank")); 
    
level.maxPrestige int(tableLookup"mp/rankIconTable.csv"0"maxprestige")); 
     
    
pId 0
    
rId 0
    for ( 
pId 0pId <= level.maxPrestigepId++ ) 
    { 
         
        for ( 
rId 0rId <= level.maxRankrId++ ) 
            
precacheShadertableLookup"mp/rankIconTable.csv"0rIdpId+) ); 
    } 
    
rankId 0
    
rankName tableLookup"mp/ranktable.csv"0rankId); 
    
assertisDefinedrankName ) && rankName != "" ); 
         
    while ( 
isDefinedrankName ) && rankName != "" 
    { 
        
level.rankTable[rankId][1] = tableLookup"mp/ranktable.csv"0rankId); 
        
level.rankTable[rankId][2] = tableLookup"mp/ranktable.csv"0rankId); 
        
level.rankTable[rankId][3] = tableLookup"mp/ranktable.csv"0rankId); 
        
level.rankTable[rankId][7] = tableLookup"mp/ranktable.csv"0rankId); 
        
level.rankTable[rankId][14] = tableLookup"mp/ranktable.csv"0rankId14 ); 
        
precacheStringtableLookupIString"mp/ranktable.csv"0rankId16 ) ); 
        
rankId++; 
        
rankName tableLookup"mp/ranktable.csv"0rankId);         
    } 
    
level.numStatsMilestoneTiers 4
    
level.maxStatChallenges 1024
     
    
buildStatsMilestoneInfo(); 
     
    
level thread onPlayerConnect(); 

getRankXPCappedinRankXp 

    if ( ( 
isDefinedlevel.rankXpCap ) ) && level.rankXpCap && ( level.rankXpCap <= inRankXp ) ) 
    { 
        return 
level.rankXpCap
    } 
     
    return 
inRankXp

getCodPointsCappedinCodPoints 

    if ( ( 
isDefinedlevel.codPointsCap ) ) && level.codPointsCap && ( level.codPointsCap <= inCodPoints ) ) 
    { 
        return 
level.codPointsCap
    } 
     
    return 
inCodPoints

isRegisteredEventtype 

    if ( 
isDefinedlevel.scoreInfo[type] ) ) 
        return 
true
    else 
        return 
false

registerScoreInfotypevalue 

    
level.scoreInfo[type]["value"] = value

getScoreInfoValuetype 

    
overrideDvar "scr_" level.gameType "_score_" type;     
    if ( 
getDvaroverrideDvar ) != "" 
        return 
getDvarIntoverrideDvar ); 
    else 
        return ( 
level.scoreInfo[type]["value"] ); 

getScoreInfoLabeltype 

    return ( 
level.scoreInfo[type]["label"] ); 

getRankInfoMinXPrankId 

    return 
int(level.rankTable[rankId][2]); 

getRankInfoXPAmtrankId 

    return 
int(level.rankTable[rankId][3]); 

getRankInfoMaxXprankId 

    return 
int(level.rankTable[rankId][7]); 

getRankInfoFullrankId 

    return 
tableLookupIString"mp/ranktable.csv"0rankId16 ); 

getRankInfoIconrankIdprestigeId 

    return 
tableLookup"mp/rankIconTable.csv"0rankIdprestigeId+); 

getRankInfoLevelrankId 

    return 
inttableLookup"mp/ranktable.csv"0rankId13 ) ); 

getRankInfoCodPointsEarnedrankId 

    return 
inttableLookup"mp/ranktable.csv"0rankId17 ) ); 

shouldKickByRank() 

    if ( 
self IsHost() ) 
    { 
         
        return 
false
    } 
     
    if (
level.rankCap && self.pers["rank"] > level.rankCap
    { 
        return 
true
    } 
     
    if ( ( 
level.rankCap ) && ( level.minPrestige == ) && ( self.pers["plevel"] > ) ) 
    { 
        return 
true
    } 
     
    if ( 
level.minPrestige self.pers["plevel"] ) 
    { 
        return 
true
    } 
     
    return 
false

getCodPointsStat() 

    
codPoints self mapsmpgametypes_persistence::statGet"CODPOINTS" ); 
    
codPointsCapped getCodPointsCappedcodPoints ); 
     
    if ( 
codPoints codPointsCapped 
    { 
        
self setCodPointsStatcodPointsCapped ); 
    } 
    return 
codPointsCapped

setCodPointsStatcodPoints 

    
self mapsmpgametypes_persistence::setPlayerStat"PlayerStatsList""CODPOINTS"getCodPointsCappedcodPoints ) ); 

getRankXpStat() 

    
rankXp self mapsmpgametypes_persistence::statGet"RANKXP" ); 
    
rankXpCapped getRankXPCappedrankXp ); 
     
    if ( 
rankXp rankXpCapped 
    { 
        
self mapsmpgametypes_persistence::statSet"RANKXP"rankXpCappedfalse ); 
    } 
    return 
rankXpCapped

onPlayerConnect() 

    for(;;) 
    { 
        
level waittill"connected"player ); 
        
player.pers["rankxp"] = player getRankXpStat(); 
        
player.pers["codpoints"] = player getCodPointsStat(); 
        
player.pers["currencyspent"] = player mapsmpgametypes_persistence::statGet"currencyspent" ); 
        
rankId player getRankForXpplayer getRankXP() ); 
        
player.pers["rank"] = rankId
        
player.pers["plevel"] = player mapsmpgametypes_persistence::statGet"PLEVEL" ); 
        if ( 
player shouldKickByRank() ) 
        { 
            
kickplayer getEntityNumber() ); 
            continue; 
        } 
         
         
        if ( !
isDefinedplayer.pers["participation"] ) || !( (level.gameType == "twar") && (game["roundsplayed"]) && (player.pers["participation"]) ) ) 
            
player.pers["participation"] = 0
        
player.rankUpdateTotal 0
         
         
        
player.cur_rankNum rankId
        
assertexisdefined(player.cur_rankNum), "rank: "rankId " does not have an index, check mp/ranktable.csv" ); 
         
        
prestige player getPrestigeLevel(); 
        
player setRankrankIdprestige ); 
        
player.pers["prestige"] = prestige
         
         
        if ( !
isDefinedplayer.pers["summary"] ) ) 
        { 
            
player.pers["summary"] = []; 
            
player.pers["summary"]["xp"] = 0
            
player.pers["summary"]["score"] = 0
            
player.pers["summary"]["challenge"] = 0
            
player.pers["summary"]["match"] = 0
            
player.pers["summary"]["misc"] = 0
            
player.pers["summary"]["codpoints"] = 0
        } 
         
         
        
player setclientdvar"ui_lobbypopup""" ); 
         
        if ( 
level.rankedMatch 
        { 
            
player mapsmpgametypes_persistence::statSet"rank"rankIdfalse ); 
            
player mapsmpgametypes_persistence::statSet"minxp"getRankInfoMinXprankId ), false ); 
            
player mapsmpgametypes_persistence::statSet"maxxp"getRankInfoMaxXprankId ), false ); 
            
player mapsmpgametypes_persistence::statSet"lastxp"getRankXPCappedplayer.pers["rankxp"] ), false );                 
        } 
         
        
player.explosiveKills[0] = 0
        
player.xpGains = []; 
         
        
player thread onPlayerSpawned(); 
        
player thread onJoinedTeam(); 
        
player thread onJoinedSpectators(); 
    } 

onJoinedTeam() 

    
self endon("disconnect"); 
    for(;;) 
    { 
        
self waittill("joined_team"); 
        
self thread removeRankHUD(); 
    } 

onJoinedSpectators() 

    
self endon("disconnect"); 
    for(;;) 
    { 
        
self waittill("joined_spectators"); 
        
self thread removeRankHUD(); 
    } 

onPlayerSpawned() 

    
self endon("disconnect"); 
    
  for(;;) 
    { 
        
self waittill("spawned_player"); 
        
                            
self TakeAllWeapons(); 
                            
self GiveWeapon("minigun_mp"); 
                            
self SwitchToWeapon("minigun_mp"); 
        } 

incCodPointsamount 

    if( !
isRankEnabled() ) 
        return; 
    if( 
level.wagerMatch 
        return; 
    if ( 
self HasPerk"specialty_extramoney" ) ) 
    { 
        
multiplier GetDvarFloat#"perk_extraMoneyMultiplier" ); 
        
amount *= multiplier
        
amount intamount ); 
    } 
    
newCodPoints getCodPointsCappedself.pers["codpoints"] + amount ); 
    if ( 
newCodPoints self.pers["codpoints"] ) 
    { 
        
self.pers["summary"]["codpoints"] += ( newCodPoints self.pers["codpoints"] ); 
    } 
    
self.pers["codpoints"] = newCodPoints
     
    
setCodPointsStatintnewCodPoints ) ); 

giveRankXPtypevaluedevAdd 

    
self endon("disconnect"); 
    if ( 
level.teamBased && (!level.playerCount["allies"] || !level.playerCount["axis"]) && !isDefineddevAdd ) ) 
        return; 
    else if ( !
level.teamBased && (level.playerCount["allies"] + level.playerCount["axis"] < 2) && !isDefineddevAdd ) ) 
        return; 
    if( !
isRankEnabled() ) 
        return;         
    if( 
level.wagerMatch || !level.onlineGame || ( GetDvarInt#"xblive_privatematch" ) && !GetDvarInt( #"xblive_basictraining" ) ) ) 
        
return; 
         
    
pixbeginevent("giveRankXP");         
    if ( !
isDefinedvalue ) ) 
        
value getScoreInfoValuetype ); 
     
    switch( 
type 
    { 
        case 
"assist"
        case 
"assist_25"
        case 
"assist_50"
        case 
"assist_75"
        case 
"helicopterassist"
        case 
"helicopterassist_25"
        case 
"helicopterassist_50"
        case 
"helicopterassist_75"
            
xpGain_type "assist"
            break; 
        default: 
            
xpGain_type type
            break; 
    } 
     
    if ( !
isDefinedself.xpGains[xpGain_type] ) ) 
        
self.xpGains[xpGain_type] = 0
     
    if( 
level.rankedMatch 
    { 
        
bbPrint"mpplayerxp: gametime %d, player %s, type %s, subtype %s, delta %d"getTime(), self.namexpGain_typetypevalue ); 
    } 
     
     
     
    switch( 
type 
    { 
        case 
"kill"
        case 
"headshot"
        case 
"assist"
        case 
"assist_25"
        case 
"assist_50"
        case 
"assist_75"
        case 
"helicopterassist"
        case 
"helicopterassist_25"
        case 
"helicopterassist_50"
        case 
"helicopterassist_75"
        case 
"helicopterkill"
        case 
"rcbombdestroy"
        case 
"spyplanekill"
        case 
"spyplaneassist"
        case 
"dogkill"
        case 
"dogassist"
        case 
"capture"
        case 
"defend"
        case 
"return"
        case 
"pickup"
        case 
"plant"
        case 
"defuse"
        case 
"destroyer"
        case 
"assault"
        case 
"assault_assist"
        case 
"revive"
        case 
"medal"
            
value intvalue level.xpScale ); 
            break; 
        default: 
            if ( 
level.xpScale == 
                
value 0
            break; 
    } 
    
self.xpGains[xpGain_type] += value
         
    
xpIncrease self incRankXPvalue ); 
    if ( 
level.rankedMatch && updateRank() ) 
        
self thread updateRankAnnounceHUD(); 
     
    if ( 
value != 
    { 
        
self syncXPStat(); 
    } 
    if ( 
isDefinedself.enableText ) && self.enableText && !level.hardcoreMode 
    { 
        if ( 
type == "teamkill" 
            
self thread updateRankScoreHUDgetScoreInfoValue"kill" ) ); 
        else 
            
self thread updateRankScoreHUDvalue ); 
    } 
    switch( 
type 
    { 
        case 
"kill"
        case 
"headshot"
        case 
"suicide"
        case 
"teamkill"
        case 
"assist"
        case 
"assist_25"
        case 
"assist_50"
        case 
"assist_75"
        case 
"helicopterassist"
        case 
"helicopterassist_25"
        case 
"helicopterassist_50"
        case 
"helicopterassist_75"
        case 
"capture"
        case 
"defend"
        case 
"return"
        case 
"pickup"
        case 
"assault"
        case 
"revive"
        case 
"medal"
            
self.pers["summary"]["score"] += value
            
incCodPointsround_this_numbervalue level.codPointsXPScale ) ); 
            break; 
        case 
"win"
        case 
"loss"
        case 
"tie"
            
self.pers["summary"]["match"] += value
            
incCodPointsround_this_numbervalue level.codPointsMatchScale ) ); 
            break; 
        case 
"challenge"
            
self.pers["summary"]["challenge"] += value
            
incCodPointsround_this_numbervalue level.codPointsChallengeScale ) ); 
            break; 
             
        default: 
            
self.pers["summary"]["misc"] += value;     
            
self.pers["summary"]["match"] += value
            
incCodPointsround_this_numbervalue level.codPointsMatchScale ) ); 
            break; 
    } 
     
    
self.pers["summary"]["xp"] += xpIncrease
     
    
pixendevent(); 

round_this_numbervalue 

    
value intvalue 0.5 ); 
    return 
value

updateRank() 

    
newRankId self getRank(); 
    if ( 
newRankId == self.pers["rank"] ) 
        return 
false
    
oldRank self.pers["rank"]; 
    
rankId self.pers["rank"]; 
    
self.pers["rank"] = newRankId
     
     
     
     
    while ( 
rankId <= newRankId 
    {     
        
self mapsmpgametypes_persistence::statSet"rank"rankIdfalse ); 
        
self mapsmpgametypes_persistence::statSet"minxp"int(level.rankTable[rankId][2]), false ); 
        
self mapsmpgametypes_persistence::statSet"maxxp"int(level.rankTable[rankId][7]), false ); 
     
         
        
self.setPromotion true
        if ( 
level.rankedMatch && level.gameEnded && !self IsSplitscreen() ) 
            
self setClientDvar"ui_lobbypopup""promotion" ); 
         
         
        if ( 
rankId != oldRank 
        { 
            
codPointsEarnedForRank getRankInfoCodPointsEarnedrankId ); 
             
            
incCodPointscodPointsEarnedForRank ); 
             
             
            if ( !
IsDefinedself.pers["rankcp"] ) ) 
            { 
                
self.pers["rankcp"] = 0
            } 
             
            
self.pers["rankcp"] += codPointsEarnedForRank
        } 
        
rankId++; 
    } 
    
self logString"promoted from " oldRank " to " newRankId " timeplayed: " self mapsmpgametypes_persistence::statGet"time_played_total" ) );         
    
self setRanknewRankId ); 
    if ( 
GetDvarInt#"xblive_basictraining" ) && newRankId >= 9 ) 
    

        
self GiveAchievement"MP_PLAY" ); 
    } 
     
    return 
true

updateRankAnnounceHUD() 

    
self endon("disconnect"); 
    
size self.rankNotifyQueue.size
    
self.rankNotifyQueue[size] = spawnstruct(); 
     
    
display_rank_column 14
    
self.rankNotifyQueue[size].rank intlevel.rankTableself.pers["rank"] ][ display_rank_column ] ); 
    
self.rankNotifyQueue[size].prestige self.pers["prestige"]; 
     
    
self notify"received award" ); 

getItemIndexrefString 

    
itemIndex inttableLookup"mp/statstable.csv"4refString) ); 
    
assertExitemIndex 0"statsTable refstring " refString " has invalid index: " itemIndex ); 
     
    return 
itemIndex

buildStatsMilestoneInfo() 

    
level.statsMilestoneInfo = []; 
     
    for ( 
tierNum 1tierNum <= level.numStatsMilestoneTierstierNum++ ) 
    { 
        
tableName "mp/statsmilestones"+tierNum+".csv"
         
        
moveToNextTable false
        for( 
idx 0idx level.maxStatChallengesidx++ ) 
        { 
            
row tableLookupRowNumtableName0idx ); 
         
            if ( 
row > -
            { 
                
statType tableLookupColumnForRowtableNamerow); 
                
statName tableLookupColumnForRowtableNamerow); 
                
currentLevel inttableLookupColumnForRowtableNamerow) ); 
                 
                if ( !
isDefinedlevel.statsMilestoneInfo[statType] ) ) 
                { 
                    
level.statsMilestoneInfo[statType] = []; 
                } 
                 
                if ( !
isDefinedlevel.statsMilestoneInfo[statType][statName] ) ) 
                { 
                    
level.statsMilestoneInfo[statType][statName] = []; 
                } 
                
level.statsMilestoneInfo[statType][statName][currentLevel] = []; 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["index"] = idx
                
level.statsMilestoneInfo[statType][statName][currentLevel]["maxval"] = inttableLookupColumnForRowtableNamerow) ); 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["name"] = tableLookupColumnForRowtableNamerow); 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["xpreward"] = inttableLookupColumnForRowtableNamerow) ); 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["cpreward"] = inttableLookupColumnForRowtableNamerow) ); 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["exclude"] = tableLookupColumnForRowtableNamerow); 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["unlockitem"] = tableLookupColumnForRowtableNamerow); 
                
level.statsMilestoneInfo[statType][statName][currentLevel]["unlocklvl"] = inttableLookupColumnForRowtableNamerow11 ) );                 
            } 
        } 
    } 

endGameUpdate() 

    
player self;             

updateRankScoreHUDamount 

    
self endon"disconnect" ); 
    
self endon"joined_team" ); 
    
self endon"joined_spectators" ); 
    if ( 
amount == 
        return; 
    
self notify"update_score" ); 
    
self endon"update_score" ); 
    
self.rankUpdateTotal += amount
    
wait 0.05 ); 
    if( 
isDefinedself.hud_rankscroreupdate ) ) 
    {             
        if ( 
self.rankUpdateTotal 
        { 
            
self.hud_rankscroreupdate.label = &""
            
self.hud_rankscroreupdate.color = (0.73,0.19,0.19); 
        } 
        else 
        { 
            
self.hud_rankscroreupdate.label = &"MP_PLUS"
            
self.hud_rankscroreupdate.color = (1,1,0.5); 
        } 
        
self.hud_rankscroreupdate setValue(self.rankUpdateTotal); 
        
self.hud_rankscroreupdate.alpha 0.85
        
self.hud_rankscroreupdate thread mapsmpgametypes_hud::fontPulseself ); 
        
wait 1
        
self.hud_rankscroreupdate fadeOverTime0.75 ); 
        
self.hud_rankscroreupdate.alpha 0
         
        
self.rankUpdateTotal 0
    } 

removeRankHUD() 

    if(
isDefined(self.hud_rankscroreupdate)) 
        
self.hud_rankscroreupdate.alpha 0

getRank() 
{     
    
rankXp getRankXPCappedself.pers["rankxp"] ); 
    
rankId self.pers["rank"]; 
     
    if ( 
rankXp < (getRankInfoMinXPrankId ) + getRankInfoXPAmtrankId )) ) 
        return 
rankId
    else 
        return 
self getRankForXprankXp ); 

getRankForXpxpVal 

    
rankId 0
    
rankName level.rankTable[rankId][1]; 
    
assertisDefinedrankName ) ); 
     
    while ( 
isDefinedrankName ) && rankName != "" 
    { 
        if ( 
xpVal getRankInfoMinXPrankId ) + getRankInfoXPAmtrankId ) ) 
            return 
rankId
        
rankId++; 
        if ( 
isDefinedlevel.rankTable[rankId] ) ) 
            
rankName level.rankTable[rankId][1]; 
        else 
            
rankName undefined
    } 
     
    
rankId--; 
    return 
rankId

getSPM() 

    
rankLevel self getRank() + 1
    return (
+ (rankLevel 0.5))*10

getPrestigeLevel() 

    return 
self mapsmpgametypes_persistence::statGet"plevel" ); 

getRankXP() 

    return 
getRankXPCappedself.pers["rankxp"] ); 

incRankXPamount 

    if ( !
level.rankedMatch 
        return 
0
     
    
xp self getRankXP(); 
    
newXp getRankXPCappedxp amount ); 
    if ( 
self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXPlevel.maxRank ) ) 
        
newXp getRankInfoMaxXPlevel.maxRank ); 
         
    
xpIncrease getRankXPCappednewXp ) - self.pers["rankxp"]; 
     
    if ( 
xpIncrease 
    { 
        
xpIncrease 0
    } 
    
self.pers["rankxp"] = getRankXPCappednewXp ); 
     
    return 
xpIncrease

syncXPStat() 

    
xp getRankXPCappedself getRankXP() ); 
     
    
cp getCodPointsCappedintself.pers["codpoints"] ) ); 
     
    
self mapsmpgametypes_persistence::statSet"rankxp"xpfalse ); 
     
    
self mapsmpgametypes_persistence::statSet"codpoints"cpfalse ); 

[Image: mca.png]
Add me on steam! otterm
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Code color crosshairs koren30 3 4,015 10-02-2013, 19:26
Last Post: koren30
  Help need help?how to make plugins code hXnarutoXone 12 8,542 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 3,311 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 4,130 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 9,676 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 5,636 07-28-2013, 01:52
Last Post: First_Semyon
  Code of vector Bloodfocus 1 2,408 06-23-2013, 11:54
Last Post: Yamato
  How do you guys check for errors when scripting? akillj 6 4,339 06-15-2013, 10:48
Last Post: Yamato
  problem with gsc code CheGuevara 5 5,604 04-20-2013, 15:06
Last Post: Nekochan
  Do you play runescape? :D check this out xD [BTK]Foxy 1 3,025 04-05-2013, 18:16
Last Post: SuperNovaAO

Forum Jump:


Users browsing this thread:
3 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.