In Pokemon Platinum you canget Riolu as an EGG from Riley in the Iron Island
Bulbapedia says in the article of Iron Island
When entering Iron Island for the first time, Riley will offer to
travel through the mine with the player, participating in wild Double
Battles with his Lucario. At the end of their travels, he will give
the player a Riolu Egg, if the player has a space for it in their
party; if not, he will wait until the player returns with an empty
Riley gives an Riolu EGG and you can hatch it.
The Riolu comes as
You can refer this Video to get a clear view.
Hope I Helped