Replace your check_afk with this one and see if it works.
PHP Code:
public check_afk(id)
{
if(is_user_alive(id))
{
if(same_origin(id))
{
user_kill(id);
new name[33];
get_user_name(id, name, 32);
client_print(0, print_chat, "%s was killed for being an AFK.", name);
}
}
}
__________________