In your project, are you referencing an up-to-date RagePluginHookSDK.dll?
From the error, I see it searches for a PlayAnimation method that returns a Rage.Task, but currently PlayAnimation returns a Rage.AnimationTask. It returned Rage.Task in really old versions of RPH (like from 2 years ago or so).
Just replace the RagePluginHookSDK.dll you're referencing with the one included in the latest RPH version download.