hook FM_cmdstart and FM_cmdend, check if primary attack command is started and create task to increace a global variable until the FM_cmdend is triggered, create the nade in FM_cmdend forward and calculate its velocity some way using the global variable you increaced with task
How can I get the entity index of the weapon the player is holding while pressing the fire in order to block its action.