You can't. I guess you can script a basketball object, and make it move according to a player's position and wether or not the ball is in front of them. But no, not like in singleplayer.
You can, you can even make custom slot machines and make the gym work. I don't know how myself although i would love to know but i have seen a server with this.