2.
Code:
switch(frags)
{
case -100..-1 :
{
client_print(id, print_chat, "%L", id, "NOFRAGS_MSG")
}
case 0..9 :
{
client_print(id, print_chat, "%L", id, "NOFRAGS_MSG")
}
case 10..19 :
{
set_task(0.5,"godmode",id)
client_print(id, print_chat, "%L", id, "GODMODE_MSG")
}
case 20..29 :
{
set_task(0.5,"superhealth",id)
client_print(id, print_chat, "%L", id, "HEALTH_MSG")
}
case 30..39 :
{
set_task(0.4, "superhealth_and_superarmor",id)
client_print(id, print_chat, "%L", id, "ARMOR_MSG")
}
case 40..49 :
{
set_task(0.5, "marinepack_alienabilites" , id)
client_print(id, print_chat, "%L", id, "WEAPONS_MSG")
}
case 50..59 :
{
set_task(0.5, "Give_five_XP", id)
client_print(id, print_chat, "%L", id, "EXP_MSG")
}
case 60..69 :
{
set_task(0.5, "noclipmode", id)
client_print(id, print_chat, "%L", id, "NOCLIP_MSG")
}
case 70..79 :
{
set_task(0.5, "UltraSpeed",id)
client_print(id, print_chat, "%L", id, "SPEED_MSG")
}
case 80..89 :
{
set_task(0.5, "UltraDmg", id)
client_print(id, print_chat, "%L", id, "GODLIKE_MSG")
}
}
This would be better as if() - else if() statements with inequality comparisons.
3. Don't add the fm_* functions to the bottom of your code. Include fakemeta_util.inc instead.
Unapproved since no significant changes have been made since Hawk's post.