Code:
for (new i = 1; i < 32; i++)
{
if (is_user_alive(i) == 1)
{
get_user_origin(i, PlayerPos)
Distance = get_distance(PlayerPos, origin2)
if (Distance <= Damage_Radius) {
message_begin(MSG_ONE, get_user_msgid("ScreenShake"), {0,0,0}, i)
write_short(1<<14)
write_short(1<<14)
write_short(1<<14)
message_end()
Damage = Max_Damage - floatround(floatmul(float(Max_Damage), floatdiv(float(Distance), float(Damage_Radius))))
do_victim(i, victim, Damage, 0)
}
}
}
You was cached the g_maxplayers , why you doesn't use it ? , its more efficient.
__________________