Not so long ago, I became interested in studying the restored exe SA code. Thanks to this, I was able to find various useful functions and addresses. This knowledge helped me to study in detail one of the functions responsible for firing missiles.
I post a small example and a script that demonstrates the creation of a rocket shot in the game. The archive contains an example code and a brief description of how to use it in your scripts.
The main function was taken from old examples and significantly improved. The creation of the rocket itself and its firing were implemented in one opcode (via the call scm function) All parameters of the rocket creation function are fully customized, compact and clear, which makes it easy to use this function in your scripts and conveniently combine with any object, vehicle or ped.
Activation of the script for testing missile firing - cheat code "RTEST" There are 2 firing modes available in testing mode:
Script demo:
You can find more of my works in the group: https://vk.com/goldscripts