Raised This Month: $ Target: $400
 0% 

2x experience


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GhostMan
Senior Member
Join Date: Jun 2012
Old 08-29-2012 , 11:27   2x experience
Reply With Quote #1

How do i make 2x exp http://wc3mods.net/forums/viewtopic....5cc2c5fbb5e725 for T flag players?

Do i have to do like that with every iBonusXP variable (this method would require to change a lot of lines =/)
PHP Code:
if( get_user_flagsdefuser ) & ADMIN_LEVEL_H)
{
    new 
iBonusXP XP_GivedefuserDEFUSING_BOMB ) * 2;
}
else
{
    new 
iBonusXP XP_GivedefuserDEFUSING_BOMB );

Or its simply enought to change something in XP_Give stock?

Maby something like that?
PHP Code:
stock XP_GiveidiBonusXP )
{

    if ( !
WC3_Check() || !id )
    {
        return 
0;
    }

    
// Make sure we have the minimum amount of players
    
if ( !XP_MinPlayers() )
    {
        return 
0;
    }

    
// Bonus calculated by:
    // Bonus XP * (lvl of player/10 + 1.0)
    // I.E. if Player is level 10, then it will be Bonus XP * 2.0
    
    
if ( iBonusXP != )
    {
        new 
Float:fCurrentLevel floatp_data[id][P_LEVEL] );
        new 
Float:iLevelMultiplier = ( fCurrentLevel float(MAX_LEVELS) ) + 1.0;
        new 
iRealBonusXP floatround(iLevelMultiplier iBonusXP);
        
        if( 
get_user_flagsid ) & ADMIN_LEVEL_H )
        {
            
p_data[id][P_XP] += iRealBonusXP 2;
        }
        else
        {
            
p_data[id][P_XP] += iRealBonusXP;
        }

        
XP_Checkid );

        if( 
get_user_flagsid ) & ADMIN_LEVEL_H )
        {
            return 
iRealBonusXP 2;
        }
        else
        {
            return 
iRealBonusXP;
        }
    }

    return 
0;


Last edited by GhostMan; 08-29-2012 at 11:30.
GhostMan is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode