Hi, the above post summarized this more or less. But I can tell you I personally had this problem literally last week. I bought a PC with Windows 10 and I was met with the same problem.
The main route to enabling the game to work is you will need to access certain components that may be turned off. You can go to Search > Control Manager > Programs and Features > Turn Windows Features On or OFF. This may appear blank to you, if it is, you will need to fix the windows update component *.
If it is appears, it may say: 'Please wait' for a while but it should load, if it does not, refer to *.
If it's appeared and shown a list of components you will need to enable all Direct X components, a folder called: Legacy Components and all the .NET frameworks. Make sure the black box is checked or you can manually check the subfolders within too to double check this. Once this is done, run SA:MP as an Administrator and try to run the game.
From my own experience, running SA:MP as an Administrator was the fix, running it in compatibility with others, e.g: Windows XP Service Pack 3 (which all the tutorials online say), it actually did not work for me.
__
* - If it did not load, you can refer to this topic here:
https://answers.microsoft.com/en-us/windows/forum/windows_10-update/error-0x800f0805/a5dd6981-7f7a-458f-a946-7d5863549eb3?auth=1
This is related to your Windows 10 being corrupted. It may be able to be fixed by the steps provided, if not, you will need to do what I did and reinstall windows on an ISO, usually on a DVD or detachable memory stick (you will need at least 8 GB if I am correct).
__
The error code you provided is usually to do with the game running in an uncompatible mode, try as I said, to run it as an Admin and see if it runs. That is what worked for me no less than 48 hours ago, and now my SA:MP is running smooth.
All the best my friend