i'm trying to create a linked list, the problem is that the return is always returning the id of the newest entry, it should always be returning the same id, because the id of the head should not change. does anyone know what i did wrong?

Code:
int player_list::add_player(player *add)
{
    player_entry *now  = get_head();
    player_entry *p = new player_entry;
    
    p->set_player(add);
    
    if (now == NULL)
    {
        set_head(p);
    }
    else
    {
        while (now->get_next() != NULL)
        {
            now = now->get_next();
        }
    
        now->set_next(p);
        
        return (get_head()->get_player()->get_id());
    }
    
    return (1);
}