Basically, you'd need to create scripts for two separate rivals (one for each gender) and then only allow the player to see the opposite gender version. You would have to create to OWs for each event (one boy, one girl), as well as twice the trainers (also for the boy and girl versions), then using scripts you would only show the opposite gender events.
The player's gender can be checked with the script command "checkgender," which will store either a 0 or a 1 in variable 0x800D (LASTRESULT), with 0 meaning boy and 1 meaning girl.
If you cannot understand how to implement this concept right now, you may want to practice scripting a bit more before trying this.