Quote:
Originally Posted by PresidentEvil
its working on mine,
the higher your nade regen level = the more likely you will get another nade
|
I maxed my skills to test it and it doesn't work..
Edit: Ammo regen is working apparently, but you need to fire 1 bullet for it to start.
Edit 2:
So I found where the victim/attacker ratio is created etc. Now I want to change it back to exp_kill * victim level.
Anyone that can help me with that?
Code:
public Core_PlayerDeath(victim, attacker, const String:weapon[], bool:headshot)
{
if(AreValidPlayers(victim, attacker))
{
if(AreValidTeams(victim,attacker,g_CoreConfigCache[CoreConfig_freeforall],0))
{
new amount=RoundToNearest(PlayerLevelRatio(victim,attacker)*g_CoreConfigCache[CoreConfig_exp_kill]);
if(headshot)
amount+=g_CoreConfigCache[CoreConfig_exp_headshot];
amount+=GetHurtXP(attacker);
if(amount>g_CoreConfigCache[CoreConfig_max_exp_kill] && g_CoreConfigCache[CoreConfig_max_exp_kill] != 0)
amount=g_CoreConfigCache[CoreConfig_max_exp_kill];
if(amount>0)
{
SetXP(attacker,amount,g_CoreConfigCache[CoreConfig_announcements]);
SetHurtXP(attacker,0);
}
// save victims hurt xp
new hurtxp=GetHurtXP(victim);
if(hurtxp>0)
{
SetXP(victim,hurtxp,true);
SetHurtXP(victim,0);
}
}
}
}
Code:
Float:PlayerLevelRatio(victim,attacker)
{
new victimlevel = GetLevel(victim);
new attackerlevel = GetLevel(attacker);
new Float:ratio;
if(attackerlevel>1)
ratio = float(victimlevel)/float(attackerlevel);
else
ratio = float(victimlevel);
if(ratio<=0.0)
ratio = 1.0;
return ratio;
}