We wrote the C++ Function in a DLL, exported the function (actually not necessary, but then it's easier to find the function in Cheat Engine), placed the asi in the gta folder, find the offset of the function, called the function with callwithparams from UDF.