Not that I'm the gatekeeping type, but you've shown me before that you have little understanding on how C++ works, so I honestly don't feel like going into detail on how it exactly works. I can give you a few sources however (they are all that really matter for script commands).
An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III - DK22Pac/plugin-sdk
github.com
An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III - DK22Pac/plugin-sdk
github.com
You can either try to integrate this into your own project, or use the entire plugin sdk as your base and call it a day.