I found this:
PHP Code:
public Event_Death(Handle:event, const String:name[], bool:dontBroadcast)
{
if ( GetConVarInt(g_hEnabled) == 1 )
{
new victimId = GetClientOfUserId( GetEventInt( event, "userid" ) );
new killerId = GetClientOfUserId( GetEventInt( event, "attacker" ) );
new csgoAssisterId;
if ( IsClientInGame( victimId ) )
{
//Killer points bonus
if (killerId != 0 && //The world can't gain points
killerId <= MaxClients && //No random entities can be assisters (ex: barrel (:o))
IsClientInGame(killerId) &&
GetClientTeam(victimId) != GetClientTeam(killerId)) //We don't want our allies to gain points for killing us !
{
SetEntProp(killerId, Prop_Data, "m_iFrags", GetClientFrags(killerId) + GetConVarInt(g_hAddKillerScore));
}
//Assists ($ + points)
decl assisters[ MaxClients ]; //Our assisters array
new nbAssisters; //Its length
new minDmgNeededForAssist = GetConVarInt(g_hMinDmg);
if ( g_currentMod == GAME_CSGO && GetConVarInt( g_hUseInGameThreshold ) == 1 )
{
minDmgNeededForAssist = GetConVarInt( g_hConVarAssistDamageThreshold ) + 1; //by default it's 40 but you need 41 for a Kill Assist
}
//Get assisters
if ( g_currentMod == GAME_CSGO )
csgoAssisterId = GetClientOfUserId( GetEventInt( event, "assister" ) ); //to avoid overgiving assists
if ( g_currentMod != GAME_CSGO || GetConVarInt( g_hUseInGameAssistSystem ) == 0 )
{
for ( new i = MaxClients; i >= 1; --i )
if ( g_dmgToClient[ victimId ][ i ] >= minDmgNeededForAssist && killerId != i )//If the minimum dmg is done && the killer doesn't get assist cash
assisters[ nbAssisters++ ] = i;
}
else //game is CSGO & we use the ingame assist system
{
if ( csgoAssisterId != 0 )
{
assisters[ nbAssisters++ ] = csgoAssisterId;
}
}
if ( nbAssisters > 0 ) //If we have assisters, we calculate money & assists to give them
{
if ( g_currentMod == GAME_CSS || g_currentMod == GAME_CSGO ) //Money = CS:S/GO
{
decl moneyToGive;
if ( g_currentMod == GAME_CSS ||
( g_currentMod == GAME_CSGO && GetConVarInt( g_hRewardType ) == 0 ) )
{
moneyToGive = GetConVarInt(g_hReward);
}
else //CS:GO && fraction of killer gain
{
//DEPENDING ON THE WPN, GET $ GAINED
decl String:wpn[ 32 ];
GetEventString(event, "weapon", wpn, sizeof(wpn)); //3 other doesn't really help :/
if ( StrContains( wpn, "knife", false ) == 0 ) //GG CSGO @ knife_t ; knife_default_ct ... seems to be the only exception
wpn = "knife";
decl moneyGainedByKiller;
if ( !GetTrieValue( g_hWeaponPriceTrie, wpn, moneyGainedByKiller ) )
{
moneyGainedByKiller = 300; //seems to always be this when not defined
}
moneyToGive = RoundToFloor( float( moneyGainedByKiller ) * GetConVarFloat( g_hReward ) * GetConVarFloat( g_hConVarCashFactor ) );
}
if ( moneyToGive > 0 )
{
if ( GetConVarInt(g_hSplit) == 1 )
moneyToGive /= nbAssisters;
GiveMoney( assisters, nbAssisters, moneyToGive, GetClientTeam( victimId ) );
}
}
GiveAssistPoints( assisters, nbAssisters, killerId, victimId, csgoAssisterId, GetClientTeam( victimId ) );
#if defined DEV_INTERFACE
Call_StartForward( g_hForwardKillAssist );
Call_PushArray( assisters, nbAssisters );
Call_PushCell( nbAssisters );
Call_PushCell( killerId );
Call_PushCell( victimId );
Call_Finish();
#endif
}
}
}
return bool:Plugin_Continue;
}
Full plugin here:
https://forums.alliedmods.net/showthread.php?p=1430830
I don't know if it works, and the code is hard (anyway for me). I'll try to do something with this.
Otherwise, if someone have something easier x)