You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow users to intercept various function calls in the alt:V JS API for debugging/development purposes
Example:
altvEsbuild({mode: "client",dev: {hooks: {// "alt-client" modulealt: {// hook function must be an arrow-function so it can be converted to a string// caution: variables from outer scope (any variable of build script) can't be usedlog: (args,originalFunc,alt)=>{originalFunc("alt.log is called")originalFunc(...args)alt.logWarning("calling another api function")alt.log("since alt.log is hooked this call will cause infinite recursion")},},// "natives" module (clientside only ofcourse)natives: {},globalThis: {console: { ... },
setTimeout,// ....etc.}}}})
The text was updated successfully, but these errors were encountered:
Allow users to intercept various function calls in the alt:V JS API for debugging/development purposes
Example:
The text was updated successfully, but these errors were encountered: