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_flags( defuser ) & ADMIN_LEVEL_H)
{
new iBonusXP = XP_Give( defuser, DEFUSING_BOMB ) * 2;
}
else
{
new iBonusXP = XP_Give( defuser, DEFUSING_BOMB );
}
Or its simply enought to change something in XP_Give stock?
Maby something like that?
PHP Code:
stock XP_Give( id, iBonusXP )
{
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 != 0 )
{
new Float:fCurrentLevel = float( p_data[id][P_LEVEL] );
new Float:iLevelMultiplier = ( fCurrentLevel / float(MAX_LEVELS) ) + 1.0;
new iRealBonusXP = floatround(iLevelMultiplier * iBonusXP);
if( get_user_flags( id ) & ADMIN_LEVEL_H )
{
p_data[id][P_XP] += iRealBonusXP * 2;
}
else
{
p_data[id][P_XP] += iRealBonusXP;
}
XP_Check( id );
if( get_user_flags( id ) & ADMIN_LEVEL_H )
{
return iRealBonusXP * 2;
}
else
{
return iRealBonusXP;
}
}
return 0;
}