When you downloaded the El Capitan InstallOSX.dmg did you develop it to get the Install OS X El Capitan.app
which will appear in your Applications folder.
After downloading InstallMacOSX.dmg open to get the InstallMacOSX.pkg,
double-click on that and an installation window will open, this does not install El Capitan
but converts the InstallMacOSX.pkg to the Install OS X El Capitan.app which
you will find in your Applications folder, it should be 6.2GBs in size.
This is the Terminal command you need to use, if you do change the name of the USB you are going to use and you are using a name with more than one word separated by spaces you need to enter it in Terminal correctly by using backslashes.
/Your\ USB\ Name
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app
Would be nice if you are getting an error message to actually tell us what exactly the error says.