My inglish is very bad :S
I need that the admins get and double ammo packs that players, i try with
PHP Code:
while (g_damagedealt[attacker] > get_pcvar_num(cvar_ammodamage))
{
if(get_user_flags(attacker) & ADMIN_KICK)
{
g_ammopacks[attacker] += 2
}
else
{
g_ammopacks[attacker]++
}
g_damagedealt[attacker] -= get_pcvar_num(cvar_ammodamage)
}
and work very well, but with this code the ammo add 2 and i want to add 1 but with a different cvar ej.: cvar_ADMammodamage to put the half of value
What would the code with that while?