I haved try this but when I use proc_kill the engine crash.

Note: I use a version of 3d gamestudio download from a warez site, but using my key, why I am making a game a time ago and don't work with the modern 3d gamestudio, and I don't know download a legal version of an old a7 (I think that this is legal).