The way i got it partialy working was using an Array like this , with the multi dimensional array i couldn't get anything done...
PHP Code:
new g_PartyDamage[33]
Then i made a loop inside take damage and i store all the damage into g_PartyDamage[33] like this
PHP Code:
new Players[32], user
get_party_index(attacker, Players)
for(new i; i < g_PartyData[attacker][Amount_In_Party]; i++)
{
user = Players[i]
if(is_user_alive(attacker) && !zp_get_user_zombie(attacker))
{
g_PartyDamage[user] += floatround(damage)
if(g_PartyDamage[user] >= get_pcvar_num(cvar_damage_reward))
{
zp_set_user_ammo_packs(user, zp_get_user_ammo_packs(user) + get_pcvar_num(cvar_ammo_reward))
g_PartyDamage[user] -= g_PartyDamage[user]
}
}
}
Everything worked fine, the damage of the players within the group was stored togheter inside g_PartyDamage[33]
But when a new player joined, for him the PartyDamage displayed on the hud was 0 ...
I tried multi dimensional arrays, normal arrays, anything i could of seen and think off for 3-4 days... then i felt like i wanted to kill myself and came here...